Stringing multiple sounds together.

liunx

Guest
Does anyone know how to link sounds so they play back to back?<br />
<br />
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!<br />
<br />
I want to link some sounds together from friends websites, I have written the old:<br />
<br />
<EMBED src=http://www. hidden=true loop="false" autostart="true" width="1" height="1"><br />
<EMBED src=http://www. hidden=true loop="false" autostart="false" width="1" height="1"><br />
<EMBED src=http://www. hidden=true loop="false" autostart="false" width="1" height="1"><br />
<EMBED src=http://www. hidden=true loop="false" autostart="false" width="1" height="1"><br />
<EMBED src=http://www. hidden=true loop="false" autostart="false" width="1" height="1"><br />
<EMBED src=http://www. hidden=true loop="false" autostart="false" width="1" height="1"><br />
<br />
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.<br />
<br />
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.<br />
<br />
I found something about using timenodes but this seemed very complicated and I'm a bit of a newbie t coding.<br />
<br />
Any help would be great.<br />
<br />
Thanks<br />
<br />
Spamfritter<!--content-->You could try using Flash to regulate their start and stop times<!--content-->OK but that sounds like major overkill isn't it?<br />
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??<br />
<br />
You could try using Flash to regulate their start and stop times <br />
<br />
There must be a way to do this with just plain old HTML isn't there??<br />
<br />
Thanks for the suggestion all the same.<br />
<br />
Merry Christmas.<br />
<br />
Spamfritter<!--content-->Research has turned up 2 codes but I can get neither to work<br />
<br />
one is <br />
<br />
<br />
<html><br />
<SCRIPT language=JavaScript><br />
<!-all times must be in millisecs><br />
timer=""<br />
index = 0<br />
loadtime = 2500 // time allowed for Download <!--more-->ing<br />
loadnum = 0<br />
stopped = 1<br />
<br />
song=new Array() // File name, Song Title, Playing Time<br />
song[song.length]=new Array("http://www.necrosdomain.co.uk/Download <!--more-->s/tvthemes/gadget.wav","Inspector Gadget",73000)<br />
song[song.length]=new Array("http://www.necrosdomain.co.uk/Download <!--more-->s/tvthemes/dangermo.wav","Dangermouse",33000)<br />
song[song.length]=new Array("http://www.tvthemetunes.net/_tv/b/buttonm.wav","Button Moon",32000)<br />
song[song.length]=new Array("http://www.tvthemetunes.net/_tv/b/bodgbadg.mp3","Bodger & Badger",17000)<br />
song[song.length]=new Array("http://www.trenchman.com/sounds/hammer.wav","Hammerman",72000)<br />
song[song.length]=new Array("http://www.tvthemetunes.net/_tv/b/bstar.wav","Bravestar",67000)<br />
<br />
function init(){<br />
index = Math.floor(Math.random() * song.length)<br />
//index=0 // <br />
change()<br />
}<br />
<br />
function change(){<br />
stopped=0<br />
clearTimeout(timer);<br />
if(index==song.length){<br />
index=0;<br />
document.all.track.src = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/song">http://www.webdeveloper.com/forum/archi ... x.php/song</a><!-- m -->[0][0]<br />
}<br />
else{<br />
document.all.track.src = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/song">http://www.webdeveloper.com/forum/archi ... x.php/song</a><!-- m -->[index][0]<br />
}<br />
window.status="PlayList ---- > Track "+(index+1)+" of "+song.length+" <<< "+song[index][1].substring(song[index][1].length,0)+" >>>"<br />
<br />
if(loadnum<song.length{ // if played for first time add Download <!--more--> time to play time<br />
next=song[index][2]+loadtime<br />
loadnum++<br />
index++<br />
timer=setTimeout("change()",next)}<br />
}<br />
}<br />
<br />
function stop(){<br />
if(stopped==1){return}<br />
stopped=1<br />
clearTimeout(timer);<br />
index=index-1<br />
document.all.track.src =http://www.webdeveloper.com/forum/archive/index.php/""<br />
windows.status="Player Stopped"<br />
}<br />
setTimeout("init()",2000)<br />
//--><br />
</SCRIPT><br />
<br />
<BGSOUND SCR="" ID="track" VOLUME="80"><br />
<br />
</html><br />
<br />
<br />
the other is<br />
<br />
<br />
<HTML><br />
<br />
<br />
<SCRIPT language=JavaScript><br />
timer=""<br />
a = 0<br />
time = new array()<br />
time[time.length] = 73000<br />
time[time.length] = 33000<br />
time[time.length] = 32000<br />
time[time.length] = 17000<br />
time[time.length] = 72000<br />
time[time.length] = 67000<br />
<br />
function init(){<br />
a = Math.floor(Math.random() * document.embeds.length)<br />
change()<br />
}<br />
<br />
function change (){<br />
clearTiemout(timer);<br />
if(a==document.embeds.length){<br />
a=0;<br />
documents.all.track.src = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/document.embeds">http://www.webdeveloper.com/forum/archi ... ent.embeds</a><!-- m -->[0].src<br />
}<br />
<br />
document.all.track.src = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/document.embeds">http://www.webdeveloper.com/forum/archi ... ent.embeds</a><!-- m -->[a].src<br />
windows.status="Track "+(a+1)+" of "+document.embeds.length+" <<<"+document.embeds<br />
[a].src.substring(document.embeds[a].src.length-4,0+" >>>"<br />
timer=setTimeout("change()",time[a]);<br />
a++<br />
}<br />
<br />
)<br />
function stop(){<br />
clearTimeout(timer);<br />
a=a-1;<br />
document.all.track.src =http://www.webdeveloper.com/forum/archive/index.php/""<br />
window.status="Player Stopped"<br />
}<br />
setTimeout("init()",2000)<br />
//--><br />
</SCRIPT> <br />
</HEAD><BODY><br />
<br />
<EMBED src=http://www.necrosdomain.co.uk/Download <!--more-->s/tvthemes/gadget.wav hidden=true loop="false" autostart="false" width="1" height="1" mastersound><br />
<EMBED src=http://www.necrosdomain.co.uk/Download <!--more-->s/tvthemes/dangermo.wav true loop="false" autostart="false" width="1" height="1" mastersound><br />
<EMBED src=http://www.tvthemetunes.net/_tv/b/buttonm.wav hidden=true loop="false" autostart="false" width="1" height="1" mastersound><br />
<EMBED src=http://www.tvthemetunes.net/_tv/b/bodgbadg.mp3 hidden=true loop="false" autostart="false" width="1" height="1" mastersound><br />
<EMBED src=http://www.trenchman.com/sounds/hammer.wav hidden=true loop="false" autostart="false" width="1" height="1" mastersound><br />
<EMBED src=http://www.tvthemetunes.net/_tv/b/bstar.wav hidden=true loop="false" autostart="false" width="1" height="1" mastersound><br />
<br />
<BGSOUND SRC=http://www.webdeveloper.com/forum/archive/index.php/"" ID="track" VOLUME="0"><!-- || -3000 to 0 || --><br />
</BODY></HTML><br />
<br />
<br />
troubleshooting on either would be fantastic if anyone can.<br />
<br />
Thanks<br />
<br />
Spamfritter<!--content-->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: <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> <br />
thanks<br />
<br />
colton22<br />
<br />
ps: check out my site> <!-- m --><a class="postlink" href="http://www.freewebs.com/colton22">http://www.freewebs.com/colton22</a><!-- m --> <br />
but it doesnt have this topic on there :'(<!--content-->http://www.myspacegeeks.com/myspace-generators/flash-mp3-player/<!--content-->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...<br />
<br />
this is directly from my website so the form i used was formname=_song and selectname=_list<br />
<br />
var extratime=20; //seconds<br />
function readyNewSong() {<br />
<br />
if (currentsongIndex==eval(window.document._play._list.length-1)) {currentsongIndex=1;}<br />
else {currentsongIndex++;}<br />
window.document._play._list.selectedIndex=currentsongIndex;<br />
changeSong();<br />
}<br />
function timeoutsongs() {<br />
counterforsongs++;<br />
}<br />
function _songTimeout(time2wait) {songTimeoutRunning=true; //alert("running");<br />
if (counterforsongs==time2wait) {timeoutsongs(); readyNewSong();}<br />
else {timeoutsongs(); setTimeout("_songTimeout("+time2wait+")",1000);}<br />
}<br />
function _setSongTimeout(time2send) {<br />
counterforsongs=0;<br />
_songTimeout(eval(time2send+extratime));<br />
}<br />
function clearTimeoutVariables() {timer4songTimeout=0;}<!--content-->did u try not clicking on play when page loads<br />
<br />
I dont understand your question<!--content-->
 
Back
Top