Solved

onmousover sound confined to an image map

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SharePoint and CAML query help 4 26
Jquery Ajax - on change event not being picked up 9 65
Javascript image manipulationcrop-image 7 41
Jquery syntax 12 30
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…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

752 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