Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > playing a sound from a rollover

Reply
Thread Tools

playing a sound from a rollover

 
 
Dismal Troll
Guest
Posts: n/a
 
      09-24-2003
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RollOver Link with Sound Nobody you want to meet.... HTML 5 02-01-2008 02:49 PM
Playing sound through non default sound card dkga_dkga@yahoo.com Java 0 03-05-2006 04:38 AM
Cross-browser sound on rollover JellyON Javascript 1 07-24-2005 07:30 PM
Sound on mouseover loses Down and OverDown rollover states?? Bob Richardson Javascript 0 03-04-2005 10:07 PM
Sound lost when playing AVI files Ron Clarke ASP .Net 0 02-24-2004 08:14 PM



Advertisments