problem with 'embed'

B

ben

Hi,

i put a wav file in a webpage but the sound must be heard only when the
mouse is clicked on a picture. See the code:
</HEAD><BODY>
<embed id="noise" type="audio/wav" loop=0 width="0" height="0" hidden>
....
<img border="0" id="cam" src="webcam.gif" OnClick="startnoise()" >
....
<script language=javascript>
function startnoise() {
document.getElementById("noise").src="machine.wav" }
</script>

It doesn't work (nor IE neither Netscape): no sound.
Any idea how to solve this? (if i use 'bgsound' it works with IE, but then
netscape doesn't work)
Thanks
ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top