Everyone wants there web page to be more interactive, then static. We want our pages to look more like the fancy stuff you see on TV, not the boring HTML pages that most people have. Thats where JavaScript comes in. Yes, it is more difficult and not as compatible as a Java applet, but everyone hates those little gray slow loading boxes that load on your page. They really look unprofessional. Here is the code so that you can add animation to your site: /* ImageToggle() is a simple image flipping function. It takes 2 arguments, the image name (which is in the <img> tag) and it also takes a graphic name (setup when you are declaring a new image.) declare a pair of image objects such as: imageon = new Image; imageoff = new Image; and set the source property: imageon.src = "onimage.gif"; imageoff.src = "offimage.gif"; and call it with something like: <a href="index.htmll" onMouseOver="ImageToggle(image1, imageon); return true" onMouseOut="ImageToggle(image1, imageoff); return true"> <img name="image1" src="onimage.gif" width=96 height=96 alt="" border="0"></a> */ function ImageToggle(imagename, graphicname) { imagename.src = graphicname.src; } -Enjoy!
|
|
|
|
Freebies ¤ Articles ¤ Web Design ¤ Game Design ¤ Hosting ¤ Award ¤ Misc ¤ Links ¤ Contact ~ Copyright © 1998 .Artistic Reality. All Rights Reserved. ~ |
||