You see, the main issue I'm facing right now is that the player simply wouldn't shuffle and play the next song on the list (as it should). It would just constantly repeat the same song that plays right at the start whenever the page loads up.
I would really appreciate it if someone could help me out with this!
edit: I removed the forms section cause I don't want a dropdown list to show up on my blog.
Here's the script:
===========================================================
CODE
<!-- begin code provided by createblog.com -->
<object id="darkplayer"
codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.c
ab#Version=5,1,52,701" type="application/x-oleobject" height="0"
standby="Loading Microsoft Windows Media Player components..." width="0"
classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95">
<param NAME VALUE>
<param NAME="ShowControls" VALUE="0">
<param NAME="ShowStatusBar" VALUE="0">
<param NAME="ShowDisplay" VALUE="0">
<param NAME="DefaultFrame" VALUE="Slide">
<param NAME="Autostart" VALUE="1">
<param NAME="Loop" VALUE="True">
</object>
<script Language="JavaScript">
<!--
var playstate = 1;
var shuffle = true; // false = shuffle off, true = shuffle on
var autoStart = true; // false = autoStart off, true = autoStart on
songs=new Array();
// Add song URLs here
songs[0]="songurl1";
songs[1]="songurl2";
songs[2]="songurl3";
if (shuffle == 1) {
var randsg = Math.floor(Math.random()*songs.length);
document.darkplayer.FileName = songs[randsg];
document.darkplayer.src = songs[randsg];
}
function play(list) {
if (playstate == 2) {
document.darkplayer.Play();
} else {
var snum = list.options[list.selectedIndex].value
document.darkplayer.FileName = songs[snum];
document.darkplayer.src = songs[snum];
}
playstate = 1;
}
//-->
</script>
<!-- end code provided by createblog.com -->
<object id="darkplayer"
codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.c
ab#Version=5,1,52,701" type="application/x-oleobject" height="0"
standby="Loading Microsoft Windows Media Player components..." width="0"
classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95">
<param NAME VALUE>
<param NAME="ShowControls" VALUE="0">
<param NAME="ShowStatusBar" VALUE="0">
<param NAME="ShowDisplay" VALUE="0">
<param NAME="DefaultFrame" VALUE="Slide">
<param NAME="Autostart" VALUE="1">
<param NAME="Loop" VALUE="True">
</object>
<script Language="JavaScript">
<!--
var playstate = 1;
var shuffle = true; // false = shuffle off, true = shuffle on
var autoStart = true; // false = autoStart off, true = autoStart on
songs=new Array();
// Add song URLs here
songs[0]="songurl1";
songs[1]="songurl2";
songs[2]="songurl3";
if (shuffle == 1) {
var randsg = Math.floor(Math.random()*songs.length);
document.darkplayer.FileName = songs[randsg];
document.darkplayer.src = songs[randsg];
}
function play(list) {
if (playstate == 2) {
document.darkplayer.Play();
} else {
var snum = list.options[list.selectedIndex].value
document.darkplayer.FileName = songs[snum];
document.darkplayer.src = songs[snum];
}
playstate = 1;
}
//-->
</script>
<!-- end code provided by createblog.com -->