playing a sound from a rollover

Discussion in 'Javascript' started by Dismal Troll, Sep 24, 2003.

  1. Dismal Troll

    Dismal Troll Guest

    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
     
    Dismal Troll, Sep 24, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ron Clarke

    Sound lost when playing AVI files

    Ron Clarke, Feb 24, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    357
    Ron Clarke
    Feb 24, 2004
  2. Replies:
    0
    Views:
    547
  3. Nobody you want to meet....

    RollOver Link with Sound

    Nobody you want to meet...., Jan 31, 2008, in forum: HTML
    Replies:
    5
    Views:
    2,824
    Jonathan N. Little
    Feb 1, 2008
  4. Bob Richardson
    Replies:
    0
    Views:
    124
    Bob Richardson
    Mar 4, 2005
  5. JellyON

    Cross-browser sound on rollover

    JellyON, Jul 24, 2005, in forum: Javascript
    Replies:
    1
    Views:
    107
    Richard Cornford
    Jul 24, 2005
Loading...

Share This Page