scottPadgett
03-10-2009, 04:00 PM
Can someone answer me this:
If I have a method of a class that extends MovieClip, that defines a variable like this within the method body:
var image:MovieClip = new MovieClip();
and then also adds image to the display list of the class instance in the same method:
addChildAt(image, 0);
and then outside of said method I load a bunch of bitmaps as children of the child at 0, and then remove it like this in a different method:
removeChildAt(0);
are all of those bitmaps also now gone and set aside for trash collection along with the movieclip itself, since the scope of the image variable was just the function that created the movieclip?
I don't have to destroy the movieclip or its children in any other way, do I?
Many thanks.
If I have a method of a class that extends MovieClip, that defines a variable like this within the method body:
var image:MovieClip = new MovieClip();
and then also adds image to the display list of the class instance in the same method:
addChildAt(image, 0);
and then outside of said method I load a bunch of bitmaps as children of the child at 0, and then remove it like this in a different method:
removeChildAt(0);
are all of those bitmaps also now gone and set aside for trash collection along with the movieclip itself, since the scope of the image variable was just the function that created the movieclip?
I don't have to destroy the movieclip or its children in any other way, do I?
Many thanks.