| View previous topic :: View next topic |
| Author |
Message |
ben Guest
|
Posted: Mon Jul 14, 2003 6:22 pm Post subject: problem with 'embed' |
|
|
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
|
|
| Back to top |
|
 |
Evertjan. Guest
|
Posted: Mon Jul 14, 2003 6:39 pm Post subject: Re: problem with 'embed' |
|
|
ben wrote on 14 jul 2003 in comp.lang.java.javascript:
| Quote: | 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: [...]
|
PLEASE NEVER multipost!
Crosspost if you must.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
|
|
| Back to top |
|
 |
ben Guest
|
Posted: Tue Jul 15, 2003 8:34 am Post subject: Re: problem with 'embed' |
|
|
ok, but maybe you can now give me a hint for my problem?
"Evertjan." <exjxw.hannivoort (AT) interxnl (DOT) net> wrote
| Quote: | ben wrote on 14 jul 2003 in comp.lang.java.javascript:
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: [...]
PLEASE NEVER multipost!
Crosspost if you must.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
|
|
|
| Back to top |
|
 |
|