Creating an 'OnMouseOver' Sound Link

DVDsYou need to edit the HTM code of the web page as follows:

  1. You will need a suitable sound file. You can create one using Audacity and a microphone or using a mobile phone which can record sound. Whichever method you use save the sound file as an mp3 and keep it very short. You can best do this at home and bring the sound file into school.
  2. Find in the HTML the place where </head> is.
  3. Immediately in front of this </head> tag add the following code (you can copy and paste it):
function EvalSound(soundobj) {
var thissound= eval("document."+soundobj);
  1. Make a link as normal in your web page. For example you would make the text 'Contact us' a hyperlink to your web page called 'contactus.htm'
  2. Change to viewing the page as HTML and find where you added the link. It should look something like this:
<a href="contactus.htm">Contact Us</a> 
  1. Change the link to read as follows:
<a href="onmouseoverlink.htm" onMouseOver="EvalSound('sound1')">Contact us</a>
  1. Now find in the code the tag </body> (it should be almost at the end). In front of it add this code:
<embed src="getintouch.mp3" autostart=false width=0 height=0 name="sound1"

Now try out your link - it should work but you will get a message 'Click to run an ActiveX control on this page' when the page loads if you use Internet Explorer as your Web browser.
The artist is nothing without the gift but the gift is nothing without the work - Emile Zola, French novelist
Mini-LogoAbout Us | Site Map | Privacy Policy | Contact Us | counter | ©2006 JayDax