Hey guys, I need some help. I have divs placed in a html document, and what I need to do is have a sound play when a person is to hover their mouse over the,. I used this code that I’ve butchered together from researching on the internet, but it just isn’t working. The sound plays automatically as soon as the site loads. Can you please help me? Here is my code:
[CODE]<html>
<head>
<script>
function EvalSound(soundobj) {
var thissound= eval(“document.”+soundobj);
thissound.Play();
}
</script>
<embed src=”C.mp3″ autostart=false width=0 height=0 name=”C”
enablejavascript=”true”>
<embed src=”D.mp3″ autostart=false width=0 height=0 name=”D”
enablejavascript=”true”>
</head>
<link rel=”stylesheet” type=”text/css” href=”NavTest.css”>
<div id=red alt=”#” onMouseOver=”EvalSound(‘C’)”></div>
<div id=blue alt=”#” onMouseOver=”EvalSound(‘D’)”></div>
</html>
Thank you! [:
Sorry, maybe I should also mention that my knowledge of Javascript is NONE! ?