...

View Full Version : if (preload.complete)



C.O.D.E.N.A.M.E
02-15-2006, 03:03 AM
var preload = new Image();
var img = new Image(0,0);
var preload = new Image();

if(preload.complete) {
img.src = preload.src;
function doSomething()
{
// execute code
}
}


How to do use this an array of images and
if(preload.complete)

Meaning can if(preload.complete) be used for an array too

shyam
02-15-2006, 10:20 AM
var preloads = [new Image(), new Image(0,0)];
gives an array of images and no you cannot use the preloads.complete because the array object will not have a complete attribute. you have to loop through the individual elements



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum