Research has turned up 2 codes but I can get neither to work
one is
Code:
<html>
<SCRIPT language=JavaScript>
<!-all times must be in millisecs>
timer=""
index = 0
loadtime = 2500 // time allowed for downloading
loadnum = 0
stopped = 1
song=new Array() // File name, Song Title, Playing Time
song[song.length]=new Array("http://www.necrosdomain.co.uk/downloads/tvthemes/gadget.wav","Inspector Gadget",73000)
song[song.length]=new Array("http://www.necrosdomain.co.uk/downloads/tvthemes/dangermo.wav","Dangermouse",33000)
song[song.length]=new Array("http://www.tvthemetunes.net/_tv/b/buttonm.wav","Button Moon",32000)
song[song.length]=new Array("http://www.tvthemetunes.net/_tv/b/bodgbadg.mp3","Bodger & Badger",17000)
song[song.length]=new Array("http://www.trenchman.com/sounds/hammer.wav","Hammerman",72000)
song[song.length]=new Array("http://www.tvthemetunes.net/_tv/b/bstar.wav","Bravestar",67000)
function init(){
index = Math.floor(Math.random() * song.length)
//index=0 //
change()
}
function change(){
stopped=0
clearTimeout(timer);
if(index==song.length){
index=0;
document.all.track.src = song[0][0]
}
else{
document.all.track.src = song[index][0]
}
window.status="PlayList ---- > Track "+(index+1)+" of "+song.length+" <<< "+song[index][1].substring(song[index][1].length,0)+" >>>"
if(loadnum<song.length{ // if played for first time add download time to play time
next=song[index][2]+loadtime
loadnum++
index++
timer=setTimeout("change()",next)}
}
}
function stop(){
if(stopped==1){return}
stopped=1
clearTimeout(timer);
index=index-1
document.all.track.src =""
windows.status="Player Stopped"
}
setTimeout("init()",2000)
//-->
</SCRIPT>
<BGSOUND SCR="" ID="track" VOLUME="80">
</html>
the other is
Code:
<HTML>
<SCRIPT language=JavaScript>
timer=""
a = 0
time = new array()
time[time.length] = 73000
time[time.length] = 33000
time[time.length] = 32000
time[time.length] = 17000
time[time.length] = 72000
time[time.length] = 67000
function init(){
a = Math.floor(Math.random() * document.embeds.length)
change()
}
function change (){
clearTiemout(timer);
if(a==document.embeds.length){
a=0;
documents.all.track.src = document.embeds[0].src
}
document.all.track.src = document.embeds[a].src
windows.status="Track "+(a+1)+" of "+document.embeds.length+" <<<"+document.embeds
[a].src.substring(document.embeds[a].src.length-4,0+" >>>"
timer=setTimeout("change()",time[a]);
a++
}
)
function stop(){
clearTimeout(timer);
a=a-1;
document.all.track.src =""
window.status="Player Stopped"
}
setTimeout("init()",2000)
//-->
</SCRIPT>
</HEAD><BODY>
<EMBED src=http://www.necrosdomain.co.uk/downloads/tvthemes/gadget.wav hidden=true loop="false" autostart="false" width="1" height="1" mastersound>
<EMBED src=http://www.necrosdomain.co.uk/downloads/tvthemes/dangermo.wav true loop="false" autostart="false" width="1" height="1" mastersound>
<EMBED src=http://www.tvthemetunes.net/_tv/b/buttonm.wav hidden=true loop="false" autostart="false" width="1" height="1" mastersound>
<EMBED src=http://www.tvthemetunes.net/_tv/b/bodgbadg.mp3 hidden=true loop="false" autostart="false" width="1" height="1" mastersound>
<EMBED src=http://www.trenchman.com/sounds/hammer.wav hidden=true loop="false" autostart="false" width="1" height="1" mastersound>
<EMBED src=http://www.tvthemetunes.net/_tv/b/bstar.wav hidden=true loop="false" autostart="false" width="1" height="1" mastersound>
<BGSOUND SRC="" ID="track" VOLUME="0"><!-- || -3000 to 0 || -->
</BODY></HTML>
troubleshooting on either would be fantastic if anyone can.
Thanks
Spamfritter
Bookmarks