Creating More Effective Rollovers
Then when the user moves the mouse over an image, the script swaps out one variable containing an image for a second variable containing the replacement image. Script 2 (below) shows how it is done. The visible result is the same as in Figures 1 and 2, but the apparent animation is smoother.
Script 2 This is a better way to do rollovers than in Script 1, because it won't cause errors in older browsers and the animation is smoother.