aySound[0]="YourSoundFile.wav";
aySound[1]="AnotherSoundFile.wav";
aySound[2]="EvenAnotherOne.wav";
.
.
as many sound files as one wants.
Step III - Play the sound files with an event handler.
With a link:
- onMouseOver/onMouseOut sound:
<A HREF="YourPage.html" onMouseOver="playSound(0)" onMouseOut="stopSound(0)"></A>
- onClick sound:
<A HREF="javascript:playSound(1);"></A>
With a button:
-
<INPUT TYPE="BUTTON" VALUE="Click me!" onClick="playSound(1)">
If there are any errors installing or running this script,
please e-mail us at webmaster@jsarchive.8m.com
Back home
designed by JavaScript Archive, ©1999