Results 1 to 3 of 3

Thread: Sound Rollover, continue sound until mouseout

  1. #1
    Join Date
    Aug 2009
    Posts
    39
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Sound Rollover, continue sound until mouseout

    1) Script Title: DOM Image and Sound Rollover v4.0

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex15/domroll.htm

    3) Describe problem: I love the rollover sound effect, but is there a way to make the sound continue (replay the sound file) for as long
    as the mouse cursor is hovering over the image?
    Need this for a "spooky" website where the Entrance page has a big old-fashioned animated "knocker". The sound file plays 3 deep knocks, but then the sound stops while the knocker's animation itself continues as long as the mouse cursor hovers over the knocker without clicking the link to enter the site. I know I could alternatively multiply the length of the sound files (mp3, wav, and ogg), but would prefer to keep them as small as possible, so making the 3-knock sound repeat would be the better option...IF it is possible.
    Any help or advice would be greatly appreciated.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Sure, try the below modified .js file. It sets the htmlaudio5 player so it loops while the mouse is over the target element.
    Attached Files Attached Files
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    Nightwing308 (11-18-2014)

  4. #3
    Join Date
    Aug 2009
    Posts
    39
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    AWESOME!!! That's exactly what I needed, and works like a charm! Thanks a whole bunch!

Similar Threads

  1. Button sound for Rollover background-color buttonuttons
    By egghead2000 in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 02-03-2010, 11:14 PM
  2. on mouseover sound
    By Adler80 in forum JavaScript
    Replies: 6
    Last Post: 10-07-2008, 04:18 PM
  3. sound help
    By mindiapolis in forum HTML
    Replies: 1
    Last Post: 06-05-2008, 12:57 PM
  4. 2 onMouseover functions: sound, & rollover
    By nycguurl in forum JavaScript
    Replies: 8
    Last Post: 11-18-2007, 08:59 PM
  5. need help adding rollover sound in Watermark
    By mild in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 02-01-2006, 04:21 PM

Bookmarks

Posting Permissions

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