Try replacing the image after your preloaded image has loaded. You
can do something like:
connect(preload, 'onload', replaceImage);
If that doesn't work for you, please post a complete example with HTML.
On 30-May-06, at 10:35 AM, ManDude wrote:
>
> I have a page that loads dynamically generated images. But whenever I
> load a new image to replace the old one, for a brief second the
> browser's default image picture (similar to the broken image picture)
> appears before the new image takes its place.
>
> Does anyone know of a way to eliminate that flicker?
>
> I've tried replacing the images using
>
> div.innerHTML = new_image_tag;
>
> as well as
>
> div.appendChild(new_img_element);
>
> I've also tried caching the images:
> preload = new Image();
> preload.src = imgsrc;
>
> Any suggestions?
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---