...

View Full Version : How to play a sound when someone puts their mouse over an image ?



need_some_help
02-24-2008, 10:56 AM
Hi ,
i need to know how to play a sound when someone puts their mouse over an image. I am using dreamweaver 8 and have no clue. please help me and i will nominate you as best member!

VIPStephan
02-24-2008, 05:02 PM
DO. NOT. CROSS-POST! :mad:
http://codingforums.com/showthread.php?t=133978

jcdevelopment
02-25-2008, 04:05 PM
well if you need it, here is some JS and html you can try




<script>
function EvalSound(soundobj) {
var thissound= eval("document."+soundobj);
thissound.Play();
}
</script>



html



<embed src="success.wav" autostart=false width=0 height=0 name="sound1"
enablejavascript="true">


then the link



<a href="#" onMouseOver="EvalSound('sound1')">Move mouse here</A>



that will do it!!

good luck

outseeker
02-25-2008, 05:19 PM
well if you need it, here is some JS and html you can try




<script>
function EvalSound(soundobj) {
var thissound= eval("document."+soundobj);
thissound.Play();
}
</script>



html



<embed src="success.wav" autostart=false width=0 height=0 name="sound1"
enablejavascript="true">


then the link



<a href="#" onMouseOver="EvalSound('sound1')">Move mouse here</A>



that will do it!!

good luck

Nice work JC. He wanted the sound when the mouse goes over an image tho;)


<img src="whatever" height="etc" width="etc" OnMouseOver="EvalSound('sound1')">



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum