Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Emergency html help


  • Please log in to reply

#1
cisebna

cisebna

    New Member

  • Member
  • Pip
  • 1 posts
Hello,

I will not be the first or last to post a dumb question as their 1st post but I have searched everywhere and i cant seem to find a solution that might be simple but I dont know what im doing.

Anyways I have this halloween webpage im making and it has a background music embeded as a mp3 right?

ok so one of the buttons I have I want it to make a mouse over effect that when the mouse is over a monsters face shows all over the screen and I want a sound of screaming to go off once the mouse is over the button


so I have the monster part but I cant seem to get the scream sound to start. heres the codes i have so far

java script
<script type="text/javascript">
<!--
function ShowObject(id, flag)
{
   var elem=document.getElementById(id);
   if(elem)
      elem.style.visibility=flag?'visible':'hidden';
}


//-->
</script>


<script language="JavaScript1.4" type="text/javascript">
<!--
function jsPlay(soundobj) {
var thissound= eval("document."+soundobj);
try {
thissound.Play();
}
catch (e) {
thissound.DoPlay();
}
}
//-->
</script> 



and the html

<div id="pictures" style="position:absolute;left:107px;top:187px;width:88px;height:20px;text-align:left;z-index:5;">
<a href="./pictures.html" onmouseover="ShowObject('monster8', 1); jsPlay('scream');return false;" onmouseout="ShowObject('monster8', 0);return false;"><img src="images/crest_09.png" id="Image4" alt="" border="0" style="width:88px;height:20px;"></a></div>

<div id="scream" style="position:absolute;left:158px;top:1091px;width:91px;height:39px;text-align:left;z-index:8;">
<embed src="hal-scream.wav" id="scream" border="0" autostart="true" loop="false" hidden="true" width="91" height="39">
</div>



I dont know what Im doing wrong, i got the codes from other website, the background music plays but the scream wont start when hover, if i put hidden = false the scream and bg music just starts together
  • 0

Advertisements







Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP