I want to store the "reference" of a Vbox so i could be able to access and use its addChild method from different classes and places.
How could i do that?
I tried to do something like this, but vain
I created a Actionscript Class, added a static var myReferences:Object = new Object();
and then did following
myReferences["area"] = myVBox;
but when i access it from some other area and do something like that, nothing happens
(myReferences["area"] as VBox).addChild(someStuff);
Please guide in this regard
it's good when you set id property of control. After that you can give you control be parent["id_of_my_control"].
The way you've described alos should works if you add your VBox to any controls as a child.
var vb:VBox = new VBox();
vb.id = "myVBox";
... // other code
// after that