Log In · Register

 
Darkplayer Drop Down Box Help
chrisrix16
post Aug 15 2004, 05:18 PM
Post #1


Newbie
*

Group: Member
Posts: 6
Joined: Aug 2004
Member No: 40,654



hey..

on my xanga... i have a darkplayer with 4 songs... theres a drop down box... and i edited the code to show the names... but the songs just play randomly when the xanga comes up... and when you select a different song... it wont change _dry.gif ... can anyone see whats wrong in the code?

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="44" standby="Loading Microsoft Windows Media Player components..." width="195" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"><PARAM NAME="transparentatStart" VALUE="true">
</object>
<form name="form">

<p style="text-align: center">
<select style="FONT-SIZE: 8pt; BACKGROUND:#000000; WIDTH: 200px; COLOR: #00CCFF; font-face: arial" name="Yellowcard Songs" size="1">
<option value="0">Only One</option>
<option value="1">Way Away</option>
<option value="2">Ocean Ovenue</option>
<option value="3">Breathing</option>

</select><br>
<input TYPE="BUTTON" NAME="darkplay" VALUE=".pLaY." onClick="play(document.forms['form'].playlist);">
<input TYPE="BUTTON" NAME="darkpause" VALUE=".PaUsE." onClick="document.darkplayer.Pause(); playstate=2;">
<input TYPE="BUTTON" NAME="darkstop" VALUE=".StOp." onClick="document.darkplayer.Stop(); playstate=2;"></p>
</form>
<script language="JavaScript">
<!--


var playstate = 1;
shuffle = 1; // set to 0 to always play first song in list
// set to 1 to randomly choose the first song to play
songs=new Array();
songs[0]="http://a420.v8383d.c8383.g.vm.akamaistream.net/7/420/8383/3b858b51/mtvrdstr.download.akamai.com/8512/wmp/0/24962/28398_1_6_04.asf";
songs[1]="http://a420.v8383d.c8383.g.vm.akamaistream.net/7/420/8383/3b858b51/mtvrdstr.download.akamai.com/8512/wmp/0/24962/28398_1_1_04.asf";
songs[2]="http://a420.v8383d.c8383.g.vm.akamaistream.net/7/420/8383/3b858b51/mtvrdstr.download.akamai.com/8512/wmp/0/24962/28398_1_3_04.asf";
songs[3]="http://a420.v8383d.c8383.g.vm.akamaistream.net/7/420/8383/3b858b51/mtvrdstr.download.akamai.com/8512/wmp/0/24962/28398_1_2_04.asf";

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


Heres my xanga if u wanna see how the problem works:

XavierFactor11's Xanga Page

Any help is appreciated
 
 
Start new topic
Replies
chrisrix16
post Aug 15 2004, 07:43 PM
Post #2


Newbie
*

Group: Member
Posts: 6
Joined: Aug 2004
Member No: 40,654



Ok now I got the drop down to work thanks matt for the code... but now the problem is that the play stop and pause buttons are blended in with the background... and you cant see them...

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="44" standby="Loading Microsoft Windows Media Player components..." width="195" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"><PARAM NAME="transparentatStart" VALUE="true">
</object>
<form name="form">

<p style="text-align: center">
<select style="FONT-SIZE: 8pt; BACKGROUND:#000000; WIDTH: 200px; COLOR: #00CCFF; font-face: arial" name="Yellowcard Songs" size="1">
<option value="0">Only One</option>
<option value="1">Way Away</option>
<option value="2">Ocean Ovenue</option>
<option value="3">Breathing</option>

</select><br>
<input TYPE="BUTTON" NAME="darkplay" VALUE=".pLaY." onClick="play(document.forms['form'].playlist);">
<input TYPE="BUTTON" NAME="darkpause" VALUE=".PaUsE." onClick="document.darkplayer.Pause(); playstate=2;">
<input TYPE="BUTTON" NAME="darkstop" VALUE=".StOp." onClick="document.darkplayer.Stop(); playstate=2;"></p>
</form>
<script language="JavaScript">
<!--


var playstate = 1;
shuffle = 1; // set to 0 to always play first song in list
// set to 1 to randomly choose the first song to play
songs=new Array();
songs[0]="http://a420.v8383d.c8383.g.vm.akamaistream.net/7/420/8383/3b858b51/mtvrdstr.download.akamai.com/8512/wmp/0/24962/28398_1_6_04.asf";
songs[1]="http://a420.v8383d.c8383.g.vm.akamaistream.net/7/420/8383/3b858b51/mtvrdstr.download.akamai.com/8512/wmp/0/24962/28398_1_1_04.asf";
songs[2]="http://a420.v8383d.c8383.g.vm.akamaistream.net/7/420/8383/3b858b51/mtvrdstr.download.akamai.com/8512/wmp/0/24962/28398_1_3_04.asf";
songs[3]="http://a420.v8383d.c8383.g.vm.akamaistream.net/7/420/8383/3b858b51/mtvrdstr.download.akamai.com/8512/wmp/0/24962/28398_1_2_04.asf";

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


http://www.xanga.com/home.aspx?user=XavierFactor11

Theres the site to see what i mean...

Thanks for the help with the drop down... any suggestions for that problem?
 

Posts in this topic


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