Aha -- I see the problem. It should look like this:There was an extra "function() {" for some reason.Code:function preloadImages() { for(var i = 0; i < arguments.length; ++i) (preloadImages.store[preloadImages.store.length] = new Image()).src = arguments[i]; } preloadImages.store = []; preloadImages("/path/to/loaded_image.png", "/path/to/mouseover_image.png", "/path/to/timed_image.png"); window.onload = function() { var e = document.images['header_image']; new FadableObject(e, 1, 10, 0, 99, false, false); e.src = preloadImages.store[0].src; e.onmouseover = function() { this.fadeThread.fadeOut(function(){ this.element.src = preloadImages.store[1].src; this.fadeIn(); }); }; e.onmouseout = function() { document.images['header_image'].fadeThread.fadeOut(function(){ this.element.src = preloadImages.store[0].src; this.fadeIn(); }); }; window.setTimeout( function() { document.images['header_image'].fadeThread.fadeOut(function(){ this.element.src = preloadImages.store[2].src; this.fadeIn(); }); }, 3000 ); e = null; };



Reply With Quote
Bookmarks