Music On Refresh, it is not working!!! |
![]() ![]() |
Music On Refresh, it is not working!!! |
Aug 24 2004, 07:37 PM
Post
#1
|
|
![]() Member ![]() ![]() Group: Member Posts: 27 Joined: Aug 2004 Member No: 41,144 |
alright I am trying to get my xanga to play a different song each time you refresh the page but it won't work. all the happens is the code shows up. here is the code I am using...
CODE <!-- begin code provided by createblog.com --> <!-- begin code provided by createblog.com --> // modified to eliminate 'undefined' error by micron // for more xanga scripts and help go to createblog.com ctips = new Array(); ctips[0]="Anthem of our dying day"; ctips[1]="Rape Me"; ctips[2]="Vindicated"; ctips[3]="You shouldn't kiss me like that"; ctips[4]="I don't wanna miss a thing"; tips = new Array(); tips[0]="http://a420.v8383d.c8383.g.vm.akamaistream.net/7/420/8383/3b858b51/mtvrdstr.download.akamai.com/8512/wmp/4/24767/28066_1_3_04.asf"; tips[1]="http://a420.v8383d.c8383.g.vm.akamaistream.net/7/420/8383/3b858b51/mtvrdstr.download.akamai.com/8512/wmp/2/128/5558_1_4_04.asf"; tips[2]="http://a420.v8383d.c8383.g.vm.akamaistream.net/7/420/8383/3b858b51/mtvrdstr.download.akamai.com/8512/wmp/0/22181/29448_1_1_04.asf"; tips[3]="http://a420.v8383d.c8383.g.vm.akamaistream.net/7/420/8383/3b858b51/mtvrdstr.download.akamai.com/8512/wmp/4/1874/13330_1_9_04.asf"; tips[4]="http://a420.v8383d.c8383.g.vm.akamaistream.net/7/420/8383/3b858b51/mtvrdstr.download.akamai.com/8512/wmp/2/213/27194_2_9_04.asf"; index=Math.floor(Math.random() * tips.length); document.write("<center><embed src="+tips[index]+" width=0 height=0 align=top autostart=true loop=true controls=hidden type=audio/x-pn-realaudio-plugin exts=ra,ram Init fn=load-types mime-types=mime.types></embed></center>") document.write("<center><font color=#000000>"+ctips[index]+"</center>") //--> </script> <!-- end code provided by createblog.com --> <!-- end code provided by createblog.com --> I put it in the custom header.....can anyone tell if there is something wrong with the code I am using?? someone please help!!!! |
|
|
|
Aug 24 2004, 08:33 PM
Post
#2
|
|
![]() moohaha ![]() ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 2,214 Joined: Aug 2004 Member No: 41,985 |
ummmm try this refresh code
CODE <!-- begin code provided by createblog.com --> <script language="JavaScript"><!-- ctips = new Array(4); ctips[1]="Artist-Song"; ctips[2]="Artist-Song"; ctips[3]="Artist-Song"; ctips[4]="Artist-Song"; tips = new Array(4); tips[1]="song url"; tips[2]="song url"; tips[3]="song url"; tips[4]="song url"; index=Math.floor(Math.random() * tips.length); document.write("<center><embed src="+tips[index]+" width=0 height=0 align=top autostart=true loop=true controls=hidden type=audio/x-pn-realaudio-plugin exts=ra,ram Init fn=load-types mime-types=mime.types></embed></center>") document.write("<center><font color=#000000>"+ctips[index]+"</center>") //--> </script> <!-- end code provided by createblog.com --> or else u can use a dark player 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="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> <form name="form"> <p style="text-align: center"> <select style="FONT-SIZE: 8pt; BACKGROUND:#transparent; WIDTH: 150px; COLOR: #33666; font-face: verdana" name="playlist" size="1"> <option value="0">SONG NAME HERE</option> <option value="1">SONG NAME HERE</option> <option value="2">SONG NAME HERE</option> <option value="3">SONG NAME HERE</option> <option value="4">SONG NAME HERE</option> <option value="5">SONG NAME HERE</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]="SONG URL HERE"; songs[1]="SONG URL HERE"; songs[2] ="SONG URL HERE"; songs[3] ="SONG URL HERE"; songs[4] ="SONG URL HERE"; songs[5]="SONG URL HERE"; 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 --> |
|
|
|
Aug 24 2004, 08:38 PM
Post
#3
|
|
![]() Word. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 3,004 Joined: Jul 2004 Member No: 34,673 |
the music playlist is better..
|
|
|
|
Aug 24 2004, 08:38 PM
Post
#4
|
|
![]() got mo skillz ![]() ![]() ![]() Group: Member Posts: 56 Joined: Jan 2004 Member No: 2,122 |
those two codes llook identical
|
|
|
|
Aug 24 2004, 09:20 PM
Post
#5
|
|
![]() Member ![]() ![]() Group: Member Posts: 27 Joined: Aug 2004 Member No: 41,144 |
okay so I put in that code with the 4 song urls and everything and it does just fine playing the 4 songs I put in there...but then sometimes it will say undefined and this thing will pop up.....to see what I am talk about go here you may have to push the refresh button in order to see the undefined thing. can anyone tell me what is wrong!!
|
|
|
|
![]() ![]() |