Solved

onmousover sound confined to an image map

Posted on 1998-10-01
3
163 Views
Last Modified: 2006-11-17
I got the script for onmousover sounds. I have added an image map to the image, and I would like the sound to activate only when the mouse is over the image map area. Can someone revise the onmouseover script for image maps? Example: when mouse passes over the nose area on an image of a persons face, "pickit.wav" (stop picking my nose) would play. Thanks in advance.
0
Comment
Question by:wwoodall
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
jbirk earned 100 total points
ID: 1271679
Sure you just put the onMouseOver event handler that you already have right into the image map area.
Here is an example:
<CENTER><IMG SRC="images/sub_pages/butns.gif" usemap="#bottom" border=0 WIDTH="590" HEIGHT="17"></CENTER>
<MAP NAME="bottom">
<AREA SHAPE=RECT COORDS="78,1,161,17" HREF="index3.html" target="_top"
onMouseOver="window.status='goto: Main Menu'; return true"
onMouseOut="window.status=st; return true">
<AREA SHAPE=RECT COORDS="162,1,207,17" HREF="staff.html" target="main"
onMouseOver="window.status='goto: Staff'; return true"
onMouseOut="window.status=st; return true">
<AREA SHAPE=RECT COORDS="208,1,280,17" HREF="facilities.html" target="main"
onMouseOver="window.status='goto: Facilities'; return true"
onMouseOut="window.status=st; return true">
<AREA SHAPE=RECT COORDS="281,1,340,17" HREF="clients.html" target="main"
onMouseOver="window.status='goto: Clients'; return true"
onMouseOut="window.status=st; return true">
<AREA SHAPE=RECT COORDS="341,1,409,17" HREF="portfolio.html" target="main"
onMouseOver="window.status='goto: Portfolio'; return true"
onMouseOut="window.status=st; return true">
<AREA SHAPE=RECT COORDS="410,1,461,17" HREF="links.html" target="main"
onMouseOver="window.status='goto: Links'; return true"
onMouseOut="window.status=st; return true">
<AREA SHAPE=RECT COORDS="462,1,517,17" HREF="awards.html" target="main"
onMouseOver="window.status='goto: Awards'; return true"
onMouseOut="window.status=st; return true">
</MAP>

Of course your onMouseOver and onMouseOut events will be different...  Also be sure NOT to surround the image with a link.  That may mess up the map and mouseover events.

Hope this helps!  If you have the sound script and have troubles with it post your code and I can debug for you.
Best of luck!
-Josh
0
 

Author Comment

by:wwoodall
ID: 1271680
Thank you so much! It worked perfectly on the first try. Your answer was easy to read, understand, and implement. Your example could not have been more perfect. You are the man!
0
 
LVL 8

Expert Comment

by:jbirk
ID: 1271681
Thanks.  Glad to have helped.
-Josh
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now