I created an image and then created zones in it to use as links to websites when overmoused. I want the zones to also produce a sound when overmoused. Is it possible ?
Thanks for your help !
Corey Bryant
Joined: 15 May 2004
Posts: 8748
Location: Castle Pines North, CO USA
Posted: Wed Jul 27, 2005 4:07 am
This is an image map you might be referring to? If so, save this as sounds.js (replace button.au with the path / name to your media file):
Code: function soundOne() {
document.all.sound1.src =
"/sounds/button.au"}
Insert it into your page in the <head>
Code: <script src="/javascripts/sounds.js">
</script>
correcting the path to the sounds.js file as you have placed it in your root.
And then add:
Code: OnMouseOver="soundOne()
to the a href property so that you have something like:
Code: <a class="nav" href="default.asp" OnMouseOver="soundOne()">