Solved

onmousover sound confined to an image map

Posted on 1998-10-01
3
161 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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…

746 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

12 Experts available now in Live!

Get 1:1 Help Now