Song Select and Marquee, Using Jscript |
![]() ![]() |
Song Select and Marquee, Using Jscript |
Feb 1 2004, 03:45 PM
Post
#1
|
|
|
Newbie ![]() Group: Member Posts: 7 Joined: Feb 2004 Member No: 2,514 |
I was wondering if once u select a song you can change the scrolling marquee that shows that name of the song and it changes once u select anyother song:
Heres the code for Selecting A Song: <script LANGUAGE="Javascript"><!-- function sound() { //Random Sounds } ; m = new sound() ; n = 0 ; name=""; // - Sound Database - m[n++]= "http://home.ripway.com/2004-1/64822/mylastbreath.m3u" m[n++]= "http://home.ripway.com/2004-1/64822/hello.m3u" m[n++]= "http://home.ripway.com/2004-1/64822/whisper.m3u" m[n++]= "http://home.ripway.com/2004-1/64822/tourniquet.m3u" i=Math.floor(Math.random() * n) ; document.write('<bgsound src="' +m[i]+ '" id=midijuke loop=5 autostart="true">'); <!-- function midiplay(what) { document.all.midijuke.src = what.options[what.selectedIndex].value; } //--> </script> <form name=choose> Music Menu: <select size=1 onChange="midiplay(this)"> <option value="#">Click For Music <option value="http://home.ripway.com/2004-1/64822/mylastbreath.m3u">Evanescence - My Last Breath <option value="http://home.ripway.com/2004-1/64822/hello.m3u">Evanescence - Hello <option value="http://home.ripway.com/2004-1/64822/whisper.m3u">Evanescence - Whisper <option value="http://home.ripway.com/2004-1/64822/tourniquet.m3u">Evanescence - Tourniquet </select> </form> and heres the code for a scrolling marquee: <script language="JavaScript1.2"> //Specify the marquee's width (in pixels) var marqueewidth=200 //Specify the marquee's height (in pixels, pertains only to NS) var marqueeheight=20 //Specify the marquee's scroll speed (larger is faster) var speed=4 //Specify the marquee contents var marqueecontents='<font face="Arial">Song Name</font>' if (document.all) document.write('<marquee scrollAmount='+speed+' style="width:'+marqueewidth+'">'+marqueecontents+'</marquee>') function regenerate(){ window.location.reload() } function regenerate2(){ if (document.layers){ setTimeout("window.onresize=regenerate",450) intializemarquee() } } function intializemarquee(){ document.cmarquee01.document.cmarquee02.document.write('<nobr>'+marqueecontents+'</nobr>') document.cmarquee01.document.cmarquee02.document.close() thelength=document.cmarquee01.document.cmarquee02.document.width scrollit() } function scrollit(){ if (document.cmarquee01.document.cmarquee02.left>=thelength*(-1)){ document.cmarquee01.document.cmarquee02.left-=speed setTimeout("scrollit()",100) } else{ document.cmarquee01.document.cmarquee02.left=marqueewidth scrollit() } } </script> So i was thinking if you can do it. thanks |
|
|
|
![]() ![]() |