Log In · Register

 
Help with JukeBox Script
voltigeur
post Mar 21 2007, 09:34 PM
Post #1


Newbie
*

Group: Member
Posts: 6
Joined: Feb 2006
Member No: 380,851



Hey guys, I was wondering if someone could help me figure out the problem with my (i ripped part of it from createblog.com.. so it isn't quite mine) script. ermm.gif

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 -->


This post has been edited by moorepocket*: Mar 21 2007, 10:59 PM
 
 
Start new topic
Replies
voltigeur
post Mar 22 2007, 10:11 PM
Post #2


Newbie
*

Group: Member
Posts: 6
Joined: Feb 2006
Member No: 380,851



edit: i'll pm it to you instead, Kathleen
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: