home *** CD-ROM | disk | FTP | other *** search
- var Play = false;
-
- var Closed = 276;
- var Opened = 0;
- var IsOpen = false;
-
- var speed = 120;
-
- function DoLoad()
- {
- pl.setColumnWidth(1, 100)
- OnPlayStateChange()
- }
-
- function OnPlayStateChange()
- {
- if(player.Playstate==3)
- {
- Play = true
- }
- ChangeImage();
-
- nowplaying.value=player.currentmedia.getiteminfo("author");
- if(nowplaying.value != "")
- {
- nowplaying.value += " - "
- }
- nowplaying.value += player.currentmedia.name;
-
- if(nowplaying.textwidth > 218)
- {
- nowplaying.scrolling="true";
- nowplaying.left="32"
- nowplaying.width = "234"
- nowplaying.value += " -=-";
- }
- else
- {
- nowplaying.scrolling="false";
- nowplaying.left="40"
- nowplaying.width = "218"
-
- }
- }
-
- function OnOpenStateChange()
- {
- }
-
- function PClick()
- {
- if(Play)
- {
- jscript:player.controls.pause();
- }
- else
- {
- jscript:player.controls.play();
- }
- Play = !Play;
- ChangeImage();
- }
-
- function StopClick()
- {
- jscript:player.controls.stop();
- Play = false
- ChangeImage();
- }
-
- function ChangeImage()
- {
- if(Play==false)
- {
- PlayBut.image="Play.bmp";
- PlayBut.downimage="Play_off.bmp";
- PlayBut.hoverimage="Play_over.bmp";
- PlayBut.upToolTip="Play";
- }
- else
- {
- PlayBut.image="Pause.bmp";
- PlayBut.downimage="Pause_off.bmp";
- PlayBut.Hoverimage="Pause_over.bmp";
- PlayBut.upToolTip="Pause";
- }
- }
-
- function OpenC()
- {
- if(IsOpen)
- {
- sPlEar.moveto(Closed, sPlEar.top, speed);
- }
- else
- {
- sPlEar.moveto(Opened, sPlEar.top, speed);
- }
- IsOpen = !IsOpen;
- }
-
- function OpenFile()
- {
- media = theme.openDialog('FILE_OPEN','FILES_ALLMEDIA');
- if (media) {
- player.URL = media;
- player.controls.play();
- }
- }
-
-