Hi, Ive managed to sort out a code with the help of the net. What it does is that when you click the play image it changes to the stop image and plays a sound.
What im having trouble with is stopping the sound when the button is pressed again. I need to keep the function of getting the sound file dynamically.
How about when you click to stop it, document.getElementById("dummyspan").innerHTML=""? If that doesn't work, you could try having an empty sound file the you could choose to play, like so: document.getElementById("dummyspan").innerHTML=
"<embed src='emptySound.wav' hidden=true autostart=true loop=false>";
Last edited by binaryWeapon; 04-27-2008 at 11:01 PM..
Reason: icode