Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Mar 2003
    Posts
    6
    Member #
    903
    Ahhhhhhhhhhh!!!!!

    All I want to do is have a sound effect played when a person mouses over "Enter Site." I have spent an entire (wasted!) day trying to figure this out. I've tried using hundreds of different scripts out there, but none of them will work. Can someone please view my source code and tell me where I'm going wrong?!!

    http://karmafarm.wildatheartdesign.com

  2.  

  3. #2
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    You would probably be better off putting the 'enter site' into the flash.

    I will look into the JavaScript method though.
    JR

  4. #3
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    You could try something like this...
    Code:
    <html>
    <head>
    <bgsound id="sound" loop="0" src="">
    <script type="text/javascript">
    function playsound() {
    document.getElementById('sound').src = 'soundfile';
    }
    function stopsound() {
    document.getElementById('sound').src = '';
    }
    </script>
    </head>
    <body>
    <a href="whatever" onMouseOver="playsound()"
    onMouseOut="stopsound()">Sound!</a>
    </body>
    </html>
    If it doesn't work it will be a problem with the BGSOUND tag because I have never used it before.
    JR

  5. #4
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    looks good to me

  6. #5
    Junior Member
    Join Date
    Mar 2003
    Posts
    6
    Member #
    903
    Looks good to me, too, but still not working. And after an entire day of working on this, my eyes are getting blurry.

    Tried your script with the BGSOUND tag; this didn't work for me either.

  7. #6
    Senior Member skrlin's Avatar
    Join Date
    Apr 2003
    Location
    Illinois
    Posts
    562
    Member #
    1063
    What type of sound file are you using and how large is it?

    If its a large sound file it will not play until enough of it has downloaded.

    I uploaded a working example using JR's code to my server. Try it out:
    www.skrlin.com/other/sound/snd.htm
    - Brian


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:49 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com