Hi, I want to display an Flex component in several different places through out the application. And it should be the same instance of the component, but not the copies. So I think of making the Component as an Singleton.
But the problem is :
when I do something like this : var vb1: VBox = new VBox(); var vb2: VBox = new VBox();
var comp : MyComponent = new MyComponent.getInstance();
vb1.addChild(comp);
vb2.addChild(comp);
The component is displayed only in "vb2" . I think when we call vb2.addChild(comp), it removes the child in vb1.
Do anyone have an idea about how to solve this problem ?