PDA

View Full Version : disable and enable sound loops, when playing mp3's via the web site.. ?????


chris_angell
10-28-2002, 07:00 PM
Hello I am making a site where if a division becomes visible it plays a wav loop.. simple :) but I also have an option where the user can browse their harddrive to play mp3's or wavs etc through the site... but the problem I have, IS, if the user wants to play a mp3 on there machine via my site, when they make visible a sound playing division it will load a new wav loop to the src,.. stoping the tune from playing....

I hope you get what I mean , here is the code I am using..
any ideas how I could get round the problem

onLoad="loadfile"

function PlayFile() {
var x=""+document.muzic.cmuds.value+""
juke.innerHTML="<embed SRC='"+x+"' autostart='true' loop='false' WIDTH='' HEIGHT=''>" ;
}
function loadFile() {
juke.innerHTML="<embed SRC='http://www.connectonlinepreview.co.uk/gb_new/temp/look.wav' autostart='true' loop='true' WIDTH='' HEIGHT=''>" ;
}
function loop1() {
juke.innerHTML="<embed SRC='http://www.connectonlinepreview.co.uk/gb_new/temp/loop1.wav' autostart='true' loop='true' WIDTH='' HEIGHT=''>" ;
}
function loop2() {
juke.innerHTML="<embed SRC='http://www.connectonlinepreview.co.uk/gb_new/temp/loop2.wav' autostart='true' loop='true' WIDTH='' HEIGHT=''>" ;
}
function StopFile() {
juke.innerHTML="<embed SRC='' autostart='true' loop='false' WIDTH='' HEIGHT=''>" ;
}

I am not to sure how it would work.. but I want to try to enable and disable the loops somehow so the mp3'3 will only play.. ?????

here is some more code

<body bgcolor="#D0D0D0" onload="loadFile()">

<div align="center" style="width: 901; height: 56">
&nbsp;<form name="muzic">
<p>
<input type="file" name="cmuds" size="37" value=""><br>
<input type="button" onclick="PlayFile();" value="Play">
<input type="button" onclick="StopFile();" value="Stop"></p>
<input type="button" onclick="loop1();" value="loop1"></p>
<input type="button" onclick="loop2();" value="loop2"></p>
</form>

what shall I do ????