This is a discussion on Can I play a sound onMouseOver? within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; Hi all....... How can I play a sound onMouseOver? Thanks & Regards itbarota....
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi...... Yes, you can call a sound playback function from the onMouseOver event handler of a hyperlink. Try this example: place your mouse pointer over the following hyperlink, and the browser will start the playback. <a href=# class=playOnHover title="This hyperlink plays a sound onMouseOver." onClick="return false" onMouseOver="playSound();return true" onMouseOut ="stopSound();return true" > J.S.Bach's Suite in B-minor </a> The source code of the functions playSound() and stopSound() can be found in the Playing Sound section. Thanks....... |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Which kind of games do you prefer to play? | arjkhanna | Game Development | 14 | 08-15-2008 10:07 PM |
| play mp3 file using java application? | saravanan | Java Programming | 1 | 03-26-2008 02:15 AM |
| Trouble getting movieclips to play at random | aramesh | Flash Actionscript Programming | 5 | 02-19-2008 06:48 AM |
| How to open popup onmouseover and to close the same window onmouseout javascript? | bluesky | HTML, CSS and Javascript Coding Techniques | 3 | 12-07-2007 06:51 AM |
| Play MP3 file using C# | oxygen | C# Programming | 0 | 07-20-2007 12:08 AM |