Want to add a sound when someone clicks on a link? Maybe a sound to catch their attention as they move their mouse across the screen? This is how!!
You'll need texteditor or any other html coding application such as Dreamweaver. It should only take about 10 minutes to perform this exercise if you put all the coding in right.
To create an image that plays a sound whenever the mouse cursor goes over it use the following html code:??
< script> function EvalSound(soundobj) { var thissound= eval("document."+soundobj); thissound.Play(); } </script> <embed src="(name of sound file and extension)" autostart=false width=0 height=0 name="sound1" enablejavascript="true">
This will create an invisible media player that will play your file in the background.
Now to create the image to play the sound use the following:
< img src="(name of picture and file extension)" onMouseOver="EvalSound('sound1')">
There ya have it! now everytime you move your mouse cursor over the image it will play your sound. Try it out on the following picture!!
Ok first You'll have to create the song on the invisible playlist again like previously shown. If you want more than one of these icons on the same page, even if its the same picture and sound youll have to change "sound1" to "sound2" or else non of the sounds will play.
Ok now add the following to make the picture play the sound when you click on it:
< img src="(name of picture and file extension)" onClick="EvalSound('sound2')">
Great! should work like a charm. Test out the following pic.
There you have it! Now you can make awesome links with sounds effects
Aaron Gumucio
goosh22@hotmail.com
I'm about done with design school up at Utah State. Thought some web design would be a great asset.