Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2012
    Location
    The Netherlands
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    HTML5 Mouseover/Click sound effect

    Hi people !
    I went to this page:

    http://www.javascriptkit.com/script/....shtml#current

    and I applied that script to my website, everything work perfectly.
    I only have a question about it:

    * What should I add to the code to avoid the sound activate even when I'm hovering over the margin of the image?

    * Would it be possible that the sound activate only when the mouse is hovered over the image and not the margin as well ?

    * Is the only solution; to insert every image in their own div and then letting the div handle the margin?

    this is the site www.blackbandanamovement.com
    the images I'm talking about are in the footer.
    thanks in advance

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,484
    Thanks
    23
    Thanked 636 Times in 635 Posts
    On line 160
    Code:
    <img id="img1" alt="DOWNLOAD IT NOW !!" height="40" onmousedown="clicksound.playclip(); FP_swapImg(1,0,/*id*/'img1',/*url*/'button97.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'button95.jpg')" onmouseover="mouseoversound.playclip(); FP_swapImg(1,0,/*id*/'img1',/*url*/'button96.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'button96.jpg')" src="button95.jpg" style="border: 0" width="200" /><!-- MSComment="ibutton" fp-style="fp-btn: Glass Capsule 4; fp-font: Square721 BT; fp-font-style: Bold; fp-font-size: 12; fp-font-color-hover: #C0C0C0; fp-font-color-press: #FFFFFF; fp-bgcolor: #333333" fp-title="DOWNLOAD IT NOW !!" --></a></div>
    Remove
    Code:
    onmouseover="mouseoversound.playclip();
    And to get rid of that jump out of your skin when clicked sound remove
    Code:
    onmousedown="clicksound.playclip();

  • #3
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hover Sound Javascript example (navigation error)

    Hi guys & forum,

    I also have a question regarding the sound hover example at
    http://www.javascriptkit.com/script/...oundlink.shtml

    I think that there is a small error on that page: If you open the page, then CLICK on any of the hover sound links, and then hit the back button in your browser (actually only in Opera), the hover sound file is played once again (on going back to said page).

    I'd be more than happy if somebody could point me to a way how to avoid this additional playing of the hover sound file on hitting the "back" button of the browser.

    Thanks heaps already,
    David.P
    Last edited by David.P; 03-20-2012 at 10:21 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •