Re: Rollovers - images don't preload - why?

by "Mike Kear" <choicemag(at)>

 Date:  Thu, 01 Jun 2000 02:30:12 EST
 To:  KeithWBell(at),
  todo: View Thread, Original

Thanks, I did that,but the rollovers still take 4-5 seconds to happen, no 
matter how often i do it.  And I can see the modem activity as it calls the 
second image from the site.  So it's still not preloading.

I guess I ought to throw out Fireworks and do the javascript by hand 
instead.  Has anyone been able to make Fireworks produce rollovers that work 

Any other ideas?

Mike Kear
AFP Web Development
Windsor, NSW, Australia

>From: KeithWBell(at)
>To: choicemag(at), hwg-techniques(at)
>Subject: Re: Rollovers - images don't preload - why?
>Date: Wed, 31 May 2000 12:06:04 EDT
>Hi Mike
>Just took a quick look at your page: your mouseover images are actually
>preloading - well, sort of. Your problem is that you are calling the
>"preload" function from an onLoad event in the BODY tag - so it won't 
>until AFTER the rest of the page has completely loaded.
>Instead of making the function call from the onLoad event, just put it in 
>HEAD section after defining the preload function, like this:
>/* Functions that handle preload. */
>function MM_preloadImages() { //v3.0
>  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
>    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; 
>    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
>and it should have the desired effect. There are other (and possibly
>simpler!) ways to do this, but this should work without you re-hashing much
>code. By the way, another HWG member Larry Coats has a good tutorial on
>rollovers on his site at:
>or check out Ryan Holsten's "In search of the perfect rollover" on A List
>Apart at:
>Keith Bell
>In a message dated 31/05/00 16:27:40 GMT Daylight Time, 
> > I'm preparing a site, using rollovers produced from Macromedia 
> >  It's the first time I've done rollovers that way, and to tell the 
> >  all looks like gobbledegook to me.  In the past I've been able to
> >
> >  the javascript written by these apps, but in this case, its totally
> >  impenetrable for me.
> >
> >  And it's not working right.  I hope someone who knows more about
> >  than I can tell me what's wrong
> >
> >  The images are swapping ok, but the mouseover images aren't preloading.
> >
> >  page is going to the site to get the images as the mouse goes over it.  
> >  it's not swapping fast.

Get Your Private, Free E-mail from MSN Hotmail at

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA