BigPete
06-03-2005, 02:41 AM
Can some of you check my code and see why it is not working? I have an array of images, and a function which should preload them. But alas, it does not. Here's the code:
var pics = new Array()
{
pics[0] = "images/gallery/ff/ff1.jpg"
pics[1] = "images/gallery/ff/ff2.jpg"
pics[2] = "images/gallery/ff/ff3.jpg"
pics[3] = "images/gallery/ff/ff4.jpg"
}
function preloader()
{
imageObj = new Image();
for(i=0; i<total; i++)
{
imageObj.src=pics[i];
}
}
var pics = new Array()
{
pics[0] = "images/gallery/ff/ff1.jpg"
pics[1] = "images/gallery/ff/ff2.jpg"
pics[2] = "images/gallery/ff/ff3.jpg"
pics[3] = "images/gallery/ff/ff4.jpg"
}
function preloader()
{
imageObj = new Image();
for(i=0; i<total; i++)
{
imageObj.src=pics[i];
}
}