Hey, I'm kinda new to AS3, but I've been trying to learn and read the LiveDocumentation as much as possible, and yet I can't get past this problem:
There's a Loader that I'm filling with different images depending on the button clicked. Now to keep it tidy I'm using the exact same loader. The problem is that no matter what I do to the image, the next image loaded always get's the properties of the previous one. I've used unload and the Loader returns 0 in width and height, and still the next image get's the previous image's w/h. Othe attempts have been separating it from the parent container and taking it out of the display list, and also using an Event.UNLOAD to make sure the previous image is out before the loading of the new image.
Script is gonne kinda long, but the basics would be these,
BrowserLoad.unload();
BrowserReq = new URLRequest("ImageB.jpg");
BrowserLoad.load(BrowserReq);
BrowserLoad.contentLoaderInfo.addEventListener(Event.COMPLETE, Resize);
function Resize (event:Event):void {
/*
And here a big bunch of resizing and scaling of the image loaded that i need to do, is this what's provokin' the later unwanted resizeings!?
*/
}
I guess it's general question: how can i be sure the image previously loaded in a Loader will not affect the next one coming? (its width and height being 0 has not been enough...)