onfunction / offfunction examples for sound?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Streetwise
Advanced
Advanced
Posts: 15
Joined: Mon Jan 10, 2005 1:14 pm

onfunction / offfunction examples for sound?

Post by Streetwise »

I can't seem to find much on the use of sound on mouseovers, excep one link that is dead (http://milonic.com/menu/menusample.php?sampleid=20)

Could someone post a sample of what an onfunction= and offfunction= might look like to play a file 'click.mp3' each time someone mouses over the menu items? Is that even possible?

Thanks

Dave Anderson
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Actually, you would need a function that would playSound on mouseover and stopSound on mouseOut. You would put that function into the top of the menu_data.js file, then in the aI string where you want the function to take place you'd put the code onfunction=whatever the onfunction name;offfunction=whatever the offfunction name;

There are a number of sites that have onmouseover sound function scripts, most seem to be fairly old so I don't know how much help any of them would be.

HEREand HERE and HERE are three I found.

One thing about sound onMouseOver is that all the functions I've found are set up for particular players. I don't know if there is some general function to search for whichever player is available for sound and will then play the sound onMouseOver.

Ruth
Post Reply