function loadImage(e:Event):void {
//initializing progress status
MovieClip(root).content_main.progressBar.alpha=0;
MovieClip(root).content_main.progressText.text="";
//initialize image instance ID
var imgID:String="img"+ID;
//Save the loaded bitmap to a local variable
var image:Bitmap = (Bitmap)(e.target.content);
//this will move the thumbnail to stage when image is loaded
MovieClip(root).content_main.preview_pane[imgID].addChild(image);
MovieClip(root).content_main.preview_pane[imgID].x=0;
//remove all listeners
image.removeEventListener(ProgressEvent.PROGRESS, showPreLoader);
image.removeEventListener(Event.COMPLETE, loadImage);
ID++;
//load the next image if there are still more URLs in the array
if (picture_thumbArray.length>0) {
loadPath();
} else {
pageready();
}
}//end of function loadimage
how would you remove the variable image from outside of that function if it is a local variable?
I do not have the codes with me now as I delivered to my friend.
basically I did was load the image into a container (concept), then load the container to the stage.
When I load the next image, I remove the container, and repeat the first step to load the next image.
I think what ggalan would like to know is how are you going about keeping track of those containers outside the function? I'd be curious to know as well, just to see how someone else approaches things...
__________________
Our brains have just one scale, and we resize our experiences to fit.
My apology. I do not have the .fla file with me.
I had 2 functions in my codes. 1 for loading thumbnails and 1 for loading the main picture.
I guess my threat is referring to the thumbnails which like you guys. I'm unable to remove the images. I basically load the new pictures and stack them over the old image.
Ah, well I could help with that, but it's getting late here and I should really be getting to bed. I'll do my best to help out tomorrow though , it really shouldn't be too hard to work out... Then again, maybe you want your fla first, in which case let me know when you get it and I'll do my best to help then!
-Renderer10
__________________
Our brains have just one scale, and we resize our experiences to fit.