Can you add a movieclip to the stage from a child class? My setup is as follows:
DocumentClass
->SubFolder
--->ChildClass1
--->ChildClass2
DocumentClass calls ChildClass1 and creates an instance of it. ChildClass1 has in it's constructor a call for ChildClass2 and creates an instance of it.
What is the cleanest way to have ChildClass2, which is the class for a MoveClip, added to the stage? So far, the methods I've tried are:
parent.addChild(ChildClass2)
and
send the stage object to ChildClass1 in it's constructor call on DocumentClass. Then:
stage.addChild(ChildClass2)
Are these the only methods, or are there other ways that don't have required dependencies on other files to add the MovieClip(ChildClass2) to the stage?
Edit: I am working with AS3 and Flash CS5
Edit2: So far the only solution that works for me is passing the stage to ChildClass one and then calling stage.addChild().