What is the easiest way to removechild a hoarde of components made with AS3?
I tried sprite and now movieclip to try and get around the fact that Flash doesn't allow you to addchild to scenes as common sense as that would seem to be
because I am making a dynamic form that has multiple components for each person in a group that are produced from a previous scenes group number text field.
After some hair pulling got that working only to be dismayed when adding a back button to previous scene (form) to find all the the previous scene/form components still on the scene. I
would rather not have to remove every single component when the back button is pushed so I was hoping to put them in a container that I could either make invisible or
just removechild the container. I tried both sprite and movieclip but not understanding how they work.
This is a test with movieclip but it doesn't show anything on the screen when run.
import flash.display.MovieClip;
var container1:MovieClip = new MovieClip();
container1.x = 1;
container1.y = 1;
container1.width = 400;
container1.height = 400;
container1.visible = true;
container1.opaqueBackground = 0xFF0000;
container1.border = true;
var tf2:TextField = new TextField();
tf2.border = true;
tf2.text = "text 2";
tf2.textColor = 0xFF0000;
tf2.x = 2;
tf2.y = 2;
tf2.width = 150;
tf2.height = 32;
container1.addChild(tf2);
stage.addChild(container1);
stop();
