Discussion Locked

Can you control when to precache images?

0 helpful
0 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a page that requires precaching of images and I want to be able to precache one at a time... after each one is done, it goes to the next and begins precaching, and so on...

Has anyone successfully done this or have any ideas? I've tried: (not actual code but close!)

var theImages = new Array()
...
theImages[i] = new Image();
theImages[i].src = "photo"+x+".jpg"
theImages[i].onload = [do it again with next image]

But with no luck.

thanks!

0 replies

No replies were posted before this discussion closed.

This discussion is closed to new replies.