(flex4): addChild() is not available in this class.

flex4中:

just create another container wich u place displayObject in:

// container ( IVisualElement ) for DisplayObjects
var container:UIComponent = new UIComponent();
addElement( container );

// displayObject goes to container
var displayO:Sprite = new Sprite();
container.addChild( displayO );

 

flex3中:

var container:UIComponent = new UIComponent();
addChild( container );

你可能感兴趣的:((flex4): addChild() is not available in this class.)