Solved

onmousover sound confined to an image map

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…

770 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