i have 2 classes, class A and class B
in class A i instantiate class B (but class B doesn’t need visual representation, which means i dont use addChild(classBinstance) when i instantiate class B in class A)
in class B i use some stuff like:
var mySprite:Sprite = new Sprite();
(of some other stuff that needs to be added to the display list)
so obviously i need to use addChild(mySprite).
now the only way i can think of is to make a getter getMySprite() in class B and then get that sprite from class A and in class A say: addChild(mySprite);
this works but i am not sure it its the right way to do it…