I am using thise code to load 15 images but its not working. Maybe someone can spot whats wrong. Here is the code in action: http://s91931107.onlinehome.us/preloader/
The orange light turns on too fast to have preloaded all 15 images and when i go directly to the path of the image it still has to load (so the preload didnt work). The fifteenth image is the only one that appears instantly when i link directly to it…
http://s91931107.onlinehome.us/preloader/weddingsintro4.jpg
http://s91931107.onlinehome.us/preloader/weddingsintro15.jpg
I put on a trace on the getbytestotal for emptyMC and it said 0, so that may be the problem
Anyway, here ya go:
this.onLoad = function() {
for (i=1; i<16; i++) {
allimages.createEmptyMovieClip(“holder”+i, 1+i);
emptyMC = “holder”+i;
section = “weddingsintro”;
image = section+i+".jpg";
allimages.loadMovie(image, emptyMC);
allimages._alpha = 0;
trace (i + “loaded”);
allimages[emptyMC].onEnterFrame = function() {
if (this.getBytesLoaded() == this.getBytesTotal()) {
this.loaded = true;
}
}
}
}
this.onEnterFrame = function() {
var completed = 0;
for (i=0; i<16; i++) {
if (allimages[“holder” + i].loaded == true) {
completed++;
trace (i + “completed”);
}
}
if (completed == 15) {
DONE.play();
}
}