We saw that a MouseOver can be used to change the image displayed when the mouse rolls over an image. This has an interesting application in animated images. Let’s say we have two versions of a GIF image, one of which is a still and one of which is animated. We can use a MouseOver to animate a still image when the mouse rolls over it. In your class files folder you have two images, logoscroll.gif and logostill.gif which can be used to create this effect.
1. Place the following code in the body of your HTML document:
<center>
<a href=”http://www.cit.cornell.edu/training/” mce_href=”http://www.cit.cornell.edu/training/”
onMouseOver=”document.ttslogo.src=’logoscroll.gif’ ;”
onMouseOut=”document.ttslogo.src=’logostill.gif’ ;”>
<img src=”logostill.gif” mce_src=”logostill.gif” name=”ttslogo” border=”0″>
</a>
</center>
2. View your page with the browser. If the mouseover doesn’t work, be sure to check all
semicolons, apostrophes, and quotation marks.
