MouseOver Image Script, with Preloading

Added By: corsair

(3 of 5) by 15.
Rate Snippet:
Description:  This short little guy has a function that preloads the images to be used as the rollovers and calls it when the page loads. This allows for smooth image rollovers. Each Image tag uses the Name attribute to assign a name to the image. This name is used in the onMouseOver/onMouseOut events for the links in main page. Make sure to change the Directory Path variable at the top of the script to the directory path to your image files. Also change the Image Arrays at the top of the script to hold the "off" and the "on" names of the image files. Make sure they line up. So whatever is the first filename in the "off" array has it's corresponding "on" filename in the first position of the "on" array. Works in both Netscape 4.7+ and IE 5+(which I assume also includes 4+).
Language:  JavaScript

Save to web space
E-mail Link

Code Snippet: