Click to See Complete Forum and Search --> : Stringing multiple sounds together.
spamfritter
12-20-2002, 09:46 AM
Does anyone know how to link sounds so they play back to back?
I've been asking at a different forum but noone whos replied knows how yet so I thought I'd give this one a try instead any way!
I want to link some sounds together from friends websites, I have written the old:
<EMBED src=http://www. hidden=true loop="false" autostart="true" width="1" height="1">
<EMBED src=http://www. hidden=true loop="false" autostart="false" width="1" height="1">
<EMBED src=http://www. hidden=true loop="false" autostart="false" width="1" height="1">
<EMBED src=http://www. hidden=true loop="false" autostart="false" width="1" height="1">
<EMBED src=http://www. hidden=true loop="false" autostart="false" width="1" height="1">
<EMBED src=http://www. hidden=true loop="false" autostart="false" width="1" height="1">
but I have no way of getting them to play one after another, I can't record them as one and then upload it due to restrictions on my server.
I've had 2 suggestions but to no avail; an i-frame but I couldn't get this to work and a single embed being manipulated by java but I don't know any Java.
I found something about using timenodes but this seemed very complicated and I'm a bit of a newbie t coding.
Any help would be great.
Thanks
Spamfritter
Klyve1
12-20-2002, 11:12 AM
You could try using Flash to regulate their start and stop times
spamfritter
12-20-2002, 11:17 AM
OK but that sounds like major overkill isn't it?
I only want it to play the sounds one after another, a trigger maybe or something like that, but flash?? I'd have to learn how to use it. Any other suggestions??
You could try using Flash to regulate their start and stop times
There must be a way to do this with just plain old HTML isn't there??
Thanks for the suggestion all the same.
Merry Christmas.
Spamfritter
spamfritter
12-20-2002, 05:09 PM
Research has turned up 2 codes but I can get neither to work
one is
<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
<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
Colton22
05-01-2006, 06:18 PM
ok, i do know how you can ajust this to make it work, i have, but i dont have a specific example to do it, i do, however, have a website that uses this if u would like to view>source on it, please email me: Colton22@comcast.net
thanks
colton22
ps: check out my site> http://www.freewebs.com/colton22
but it doesnt have this topic on there :'(
quiet741
06-11-2006, 05:39 PM
http://www.myspacegeeks.com/myspace-generators/flash-mp3-player/
Colton22
06-13-2006, 10:58 AM
i got the code and it works but if the user takes longer to load a song, the timing is a lil off so use a "cusion" with some extra seconds...
this is directly from my website so the form i used was formname=_song and selectname=_list
var extratime=20; //seconds
function readyNewSong() {
if (currentsongIndex==eval(window.document._play._list.length-1)) {currentsongIndex=1;}
else {currentsongIndex++;}
window.document._play._list.selectedIndex=currentsongIndex;
changeSong();
}
function timeoutsongs() {
counterforsongs++;
}
function _songTimeout(time2wait) {songTimeoutRunning=true; //alert("running");
if (counterforsongs==time2wait) {timeoutsongs(); readyNewSong();}
else {timeoutsongs(); setTimeout("_songTimeout("+time2wait+")",1000);}
}
function _setSongTimeout(time2send) {
counterforsongs=0;
_songTimeout(eval(time2send+extratime));
}
function clearTimeoutVariables() {timer4songTimeout=0;}
quiet742
06-13-2006, 01:43 PM
did u try not clicking on play when page loads
I dont understand your question