i have my website so i can play music, one song. im trying to get it so it will play a different song everytime the page is loaded, or a set list of songs. however i would like the order to change everytime i refresh the page... i have not been able to accomplish this at all. if anyone can help, it would be greatly appreciated.
p.s. im using a javascript snippet that i found for this music, but i posted this here because there was other music stuff in the html post section. if you would like to move it, please do, i just didnt know where to post.
Thats what i have... that works fine. i would just like to add a few more songs to it, so i can play them randomly on refresh.Code:<script language="JavaScript"><!-- var soundFile = "http://webzoom.freewebs.com/ethix7664/jeremys****/music/Trogdor.mp3";if (soundFile.indexOf(",") > 0) {var sounds = soundFile.split(",");soundFile = sounds[Math.floor(Math.random()*sounds.length)];}if(navigator.plugins.length>0){ if (navigator.mimeTypes["audio/mp3"] && navigator.mimeTypes["audio/mp3"].enabledPlugin) document.write('<embed src="'+soundFile+'" autostart="true" loop="1" controls="SmallConsole" width=145 height=15></embed>');} else { document.write('<embed src="'+soundFile+'" autostart="true" loop="1" width=70 height=25></embed>');} //--> </script> <noscript><embed src="http://webzoom.freewebs.com/ethix7664/jeremys****/music/Trogdor.mp3" autostart="true" loop="1"></embed></noscript> <noembed><bgsound src="http://webzoom.freewebs.com/ethix7664/jeremys****/music/Trogdor.mp3" loop=1></noembed>



Reply With Quote
got it so it plays 3 random songs per day. a different band each day.
i enjoyed coding that one... fun stuff.

Bookmarks