1 | Images may be pre-loaded (they should be cached in the <HEAD>, especially if they are to be used in the <BODY>): var images = new Array( num ); for ( var i = 0; i < num; i++ ) { images[i] = new Image(); images[i].src = "image"+ i +".gif"; } |
2 | This code loads files "image1.gif", "image2.gif", and so on |