This seems to work fine, and with no recursion:
js code: var t = new Array();
function fireloading() {
image_url[0] = "images/bottom.en/welcome_off.png";
image_url[1] = "images/bottom.en/events_off.png";
image_url[2] = "images/bottom.en/photos_off.png";
image_url[3] = "images/bottom.en/win_off.png";
image_url[4] = "images/bottom.en/touch_off.png";
image_url[5] = "images/bottom/options_off.png";
image_url[6] = "images/bottom.en/welcome_on.png";
image_url[7] = "images/bottom.en/events_on.png";
image_url[8] = "images/bottom.en/photos_on.png";
image_url[9] = "images/bottom.en/win_on.png";
image_url[10] = "images/bottom.en/touch_on.png";
image_url[11] = "images/bottom/options_on.png";
image_url[12] = "images/bottom/alternate1.png";
image_url[13] = "images/bottom/alternate1_left.png";
image_url[13] = "images/bottom/alternate1_right.png";
image_url[14] = "images/bottom/alternate2.png";
image_url[15] = "images/bottom/alternate2_left.png";
image_url[16] = "images/bottom/alternate2_right.png";
image_url[17] = "images/bottom/alternate3.png";
image_url[18] = "images/bottom/alternate3_left.png";
image_url[19] = "images/bottom/alternate3_right.png";
image_url[20] = "images/bottom/alternate4.png";
image_url[21] = "images/bottom/alternate4_left.png";
image_url[22] = "images/bottom/alternate4_right.png";
image_url[23] = "images/bottom/options_left.png";
totalimgs = image_url.length - 1;
Â
Â
for (i=0;i<image_url.length;i++) {
t[i] = new Image();
t[i].onload = bang;
t[i].src = image_url[i];
}
}
function bang() {
doneimgs++;
if (doneimgs == totalimgs) {
delete t;
new Effect.BlindDown('bottombar',{duration: 0.5});
}
}
bang! I dunno why it's double-spaced, the code-highlighter's getting freaky with it. |