Windows Media Player Playlist problems..., Autoplay not working |
Windows Media Player Playlist problems..., Autoplay not working |
Aug 12 2004, 05:40 PM
Post
#1
|
|
|
Stalking Createblog... ![]() ![]() ![]() ![]() Group: Member Posts: 155 Joined: Jan 2004 Member No: 1,300 |
Does anyone know how to make the following script autoplay the first song (songs[0])? Even with the <param NAME="autostart" VALUE="1"> it doesn't work...
CODE <!-- begin code provided by createblog.com --> <object id="darkplayer" codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" type="application/x-oleobject" height="20" standby="Loading Microsoft Windows Media Player components..." width="200" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"> <param NAME VALUE> <param NAME="ShowControls" VALUE="0"> <param NAME="ShowStatusBar" VALUE="1"> <param NAME="ShowDisplay" VALUE="0"> <param NAME="DefaultFrame" VALUE="Slide"> <param NAME="Autostart" VALUE="1"> <param NAME="Loop" VALUE="True"> </object> </p> <form name="form"> <p style="text-align: center"> <select style="FONT-SIZE: 12px; WIDTH: 356; height:200" name="playlist" size="1"> <option value="0">SONG NAME</option> <option value="1">SONG NAME</option> <option value="2">SONG NAME</option> <option value="3">SONG NAME</option> </select><br> <input TYPE="BUTTON" NAME="darkplay" VALUE="play" OnClick="play(document.forms['form'].playlist);"> </form> <script language="JavaScript"> <!-- var playstate = 1; shuffle = 0; // set to 0 to always play first song in list // set to 1 to randomly choose the first song to play // unlimited songs, just copy and paste the song line and change the number songs=new Array(); songs[0]="SONG URL"; songs[1]="SONG URL"; songs[2] ="SONG URL"; songs[3] ="SONG URL"; if (shuffle == 1) { var randsg = Math.floor(Math.random()*songs.length); document.darkplayer.FileName = songs[randsg]; document.darkplayer.scr = songs[randsg]; document.forms['form'].playlist.options[randsg].selected = true; } function play(list) { if (playstate == 2) { document.darkplayer.Play(); } else { var snum = list.options[list.selectedIndex].value document.darkplayer.FileName = songs[snum]; document.darkplayer.scr = songs[snum]; } playstate = 1; } //--> </script> <!-- end code provided by createblog.com --> Thanks guys |
|
|
|
![]() |
Aug 12 2004, 06:41 PM
Post
#2
|
|
|
Stalking Createblog... ![]() ![]() ![]() ![]() Group: Member Posts: 155 Joined: Jan 2004 Member No: 1,300 |
Okay, never mind. I fixed it. I'll post what I did in the topic about this script on "Xanga Scripts".
|
|
|
|
espionage Windows Media Player Playlist problems... Aug 12 2004, 05:40 PM
waccoon songs[0]="SONG URL";
songs[1]="SONG... Aug 12 2004, 05:51 PM
espionage I have url's there... I just replaced them wit... Aug 12 2004, 06:05 PM
espionage Argh I'm terribly sorry (Mods can punish me if... Aug 12 2004, 06:44 PM![]() ![]() |