AllExperts > Geocities Webpage Creator (HTML) 
Search      
Geocities Webpage Creator (HTML)
Volunteer
Answers to thousands of questions
 Home · More Geocities Webpage Creator (HTML) Questions · Answer Library  · Encyclopedia ·
More Geocities Webpage Creator (HTML) Answers
Question Library

Ask a question about Geocities Webpage Creator (HTML)
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Erik
Expertise
I know a lot of HTML and DHTML, JavaScript, and I can help you with almost any question about building web pages. I am also a GeoCities TimesSquare community leader, and can help with almost any GeoCities question.

Experience
I have been builing web sites for a little over 3 years

Organizations
GeoCities Community leader and volunteer program and Askme.com

Education/Credentials
Brainbench HTML 4.0 Certified
Brainbench JavaScript Certified
You can view my online transcript at http://www.brainbench.com/transcript.jsp?pid=188720

 
   

You are here:  Experts > Internet/Online > Personal Web Pages > Geocities Webpage Creator (HTML) > HELPME :'( html stuff

Geocities Webpage Creator (HTML) - HELPME :'( html stuff


Expert: Erik - 7/6/2002

Question
no one here would answer my question
my answer always expired when i needed it
this time i'll do this right
i need code for mouseover with sound and without sound
ALSO
a code for a button....whatzitcalls...i dont know. a button when i click it everytime it pops up saying different things each time

thx i see you're an absolute smartie
answer ASAP!  

Answer
#1) MOUSEOVER WITH SOUND

*** Put this code right after the <BODY> tag:
(make sure you change the image location and the sound file location)

<SCRIPT LANGUAGE="JavaScript">
function themousegoeson()
{
MPlyr.Play()
theimage.src="THE SECOND IMAGE.GIF"
}
function themousegoesoff()
{
MPlyr.Stop()
theimage.src="THE FIRST IMAGE.GIF"
}
</SCRIPT>

<OBJECT ID="MPlyr" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" WIDTH="0" HEIGHT="0">
<PARAM NAME="FileName" VALUE="SOUNDFILE.WAV">
<PARAM NAME="AutoRewind" VALUE="true">
<PARAM NAME="Balance" VALUE="0">
<PARAM NAME="AutoStart" VALUE="false">
<PARAM NAME="ShowDisplay" VALUE="false">
<PARAM NAME="ShowControls" VALUE="false">
<PARAM NAME="ShowTracker" VALUE="false">
<PARAM NAME="PlayCount" VALUE="1">
</OBJECT>

*** Put this whereever the image should be:
(make sure you change the image location)

<IMG SRC="THE FIRST IMAGE.GIF" ONMOUSEOVER="themousegoeson()" ONMOUSEOUT="themousegoesoff()" NAME="theimage">

#2) MOUSE OVER WITHOUT SOUND

*** Put this whereever the image should be:
(make sure you replace the image locations)

<IMG SRC="THE FIRST IMAGE.GIF" ONMOUSEOVER="theimage.src='THE SECOND IMAGE.GIF'" ONMOUSEOUT="theimage.src='THE FIRST IMAGE.GIF'" NAME="theimage">

#3) RANDOM SAYING

*** Put this code in the <HEAD> part of the document:
(replace the sayings)

<SCRIPT LANGUAGE="JavaScript">
function doitnow()
{
y = 0;

ad = new Array(y);

ad[y++] = "Random Saying 1"
ad[y++] = "Random Saying 2"
ad[y++] = "Random Saying 3"


x = Math.floor(Math.random()*(y));

alert(ad[x])

}
</SCRIPT>

*** Put this where the button should go (between the <BODY> tags)
(all you have to do is change the text on the button)

<FORM>
<INPUT TYPE="button" ONCLICK="doitnow()" VALUE="click me">
</FORM>




I hope this is what you were looking for!
Erik
teshack.com  

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.