Log in

View Full Version : Play sound onclick



ronh100
03-30-2014, 07:29 PM
When I use this code, the sound (click.wav) plays on page open. I need the sound to play only when hot area is clicked on image map, then customer is sent to index2.html at the same time the sound plays. Please show me how to make this happen. Thank you.

[code]
<img src="off.png" id="locks" alt="off" width="298" height="472" usemap="#Map" border="0" />
<map name="Map" id="mapimage" >
<area shape="rect" coords="110,162,193,316" href="index2.html" alt="switch" style="border:none"
onclick="MM_controlSound('play','document.CS1022563046202','click.wav')" />
</map>
<embed name='CS1022563046202' src='click.wav' loop=false
autostart='false' MASTERSOUND hidden='true' width='0' height='0'>
</embed>
[code]