Solved

onmousover sound confined to an image map

Posted on 1998-10-01
3
169 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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…
Suggested Courses

617 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