|
-
Feb 16th, 2002, 10:52 PM
#1
Thread Starter
Member
Does this image caching code work?
Code:
<!-- Preload rollovers -->
<script language="javascript">
<!--
function preloadImages()
{
imageCacher = new Array(5);
imageSources = new Array("text/passprog.gif", "text/tinyclock.gif", "text/vbtips.gif",
"text/theater.gif", "text/forums.gif");
for (i = 0; i < imageSources.length; i++)
{
imageCacher[i] = new Image();
imageCacher.src = imageSources[i];
}
}
preloadImages();
// -->
</script>
I can't tell if it does because first it does nothing appearance-wise, and second the images are small and load very quickly as it is, especially because I'm testing the page on my own computer.
-
Feb 18th, 2002, 08:27 PM
#2
PowerPoster
why use a loop when you only have 5 images?
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Feb 18th, 2002, 08:28 PM
#3
Thread Starter
Member
Why not? I did it in an array to make the code easier to manage...
-
Feb 27th, 2002, 05:09 PM
#4
Thread Starter
Member
Erm, apparently it doesn't work...why not?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|