Ryratt
05-17-2005, 07:48 PM
Somebody else wrote this and I commented the questions I have on it. Also commented the other stuff :L
function MM_preloadImages() { //v3.0
// d = document
var d=document;
if(d.images) { // if this document contains images
if(!d.MM_p) { // if MM_p doesn't exist, create it
d.MM_p=new Array(); // MM_p is an array for
}
var i; // Indexer for looping through array
var j=d.MM_p.length; // J is the length of the Array created. 0 on first run.
var a=MM_preloadImages.arguments; //create an array of the passed arguments.
for(i=0; i<a.length; i++) { // while i is less than the number of arguments
if (a[i].indexOf("#")!=0) { // Why is this checking for a #?????
d.MM_p[j]=new Image; // create new image in the document using the filename in the array
d.MM_p[j++].src=a[i]; // why is the j on this one number higher than the last one???
}
}
}
}
ANyway, I am just trying to figure out J and the #
function MM_preloadImages() { //v3.0
// d = document
var d=document;
if(d.images) { // if this document contains images
if(!d.MM_p) { // if MM_p doesn't exist, create it
d.MM_p=new Array(); // MM_p is an array for
}
var i; // Indexer for looping through array
var j=d.MM_p.length; // J is the length of the Array created. 0 on first run.
var a=MM_preloadImages.arguments; //create an array of the passed arguments.
for(i=0; i<a.length; i++) { // while i is less than the number of arguments
if (a[i].indexOf("#")!=0) { // Why is this checking for a #?????
d.MM_p[j]=new Image; // create new image in the document using the filename in the array
d.MM_p[j++].src=a[i]; // why is the j on this one number higher than the last one???
}
}
}
}
ANyway, I am just trying to figure out J and the #