playing a sound from a rollover

D

Dismal Troll

i wish to play a sound from a roll over using javascript, the code i am
using is thus:
var n=1;

function showEye(n){
var Picture=document.getElementById('eyes').style;
if(n==0){
Picture.visibility="visible";
}
if(n==1){
Picture.visibility="hidden";
}
if (n==3){
document.embeds["hithere"].play(true)
}
}
I am using the same function for my pic rollovers as my sound.
if i set autostart to true it plays my sound just fine on reload,
<embed src="hithere.wav" name="hithere" hidden=true loop=false
autostart=false mastersound>

can anybody help me with the correct syntax to do this?
thanks in advance
Richard
 

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

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top