I am trying to put a delayed sound effect into a mouseover event:
http://membre.megaquebec.net/Mike.Duffy/Puns.htm
It works fine locally, (i.e. my local disk copy), but not on the webserver.
The function is:
function delayRimshot(delay)
{setTimeout("document.getElementById('rimshot').Pl ay()",delay*1000);}
The html embedding is done with:
<embed src="rimshot.mp3" autostart=false hidden=true id="rimshot"
enablejavascript="true">
When you call it with an argument of X, is waits X seconds and then plays
the file "rimshot.mp3". In this way I can delay the sound effect depending
on how long it takes for the human to read the pun.
Does anyone have any idea why it works okay locally? I tried putting the
complete url (i.e. "http://membre.megaquebec.net/Mike.Duffy/rimshot.mp3")
into the SRC specification of the embed command, but that did not work
either. The media file:
http://membre.megaquebec.net/Mike.Duffy/rimshot.mp3
has been uploaded okay, you can go to the url on the above line to hear it.