PDA

View Full Version : Loader dies after 6 or 7 times of loading images?



DavidOrtiz
September 8th, 2008, 06:07 PM
I have 8 thumbnails that call a local variable loader to load 8 different full-size images.

For some reason as soon as I'm done viewing all 8 images and go back to see the second or third one, i'm getting a width and height of 0 and the image isn't on the screen.

It's the same function being called over and over.

any ideas why it would just stop working even though it's calling the onProgress, downloading bytes, and calling on onComplete handler?

DavidOrtiz
September 8th, 2008, 06:09 PM
oh, and the way its structure is


var mxt:* = evt.currentTarget.loader.content;
var loader:MovieClip = new MovieClip();
loader.name = "loaded_image";
loader.addChild(mxt);
imagecontainer.addChild(loader);

and when i call the function again i do:

if (imagecontainer.numChildren > 0) {
imagecontainer.removeChildAt(imagecontainer.numChi ldren-1);
}