General discussion

Locked

Can you control when to precache images?

By iclang ·
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 = new Image();
theImages.src = "photo"+x+".jpg"
theImages.onload = [do it again with next image]

But with no luck.

thanks!

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Web Development Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums