2010-06-02 47 views
0

我在“mx:Application name =”tst“”内创建了一些元素(UIComponent,主要是面板)。我需要使用Actionscript清除MouseClick事件上的所有UIComponent。有什么方法可以访问mx的子元素:应用程序(我使用
var totalChildren:Number = this[‘tst’].numChildren ;
但看起来像无法访问子列表)。
谢谢 Palash清理mx中的所有UIComponents:应用

回答

1

Application.application.removeAllChildren();

+0

嗨 我动态创建这些屏元件添加这些到应用程序(核心容器)动态如下所示: this.rawChildren.addChild(panel); 后来我尝试清理面板上点击。 即使我使用: Application.application.removeAllChildren(); - 然后它也不能删除面板。 谢谢 Palash – user267530 2010-06-02 22:14:55

+0

嗨 而不是使用this.rawChildren.addChild(面板),如果我添加面板的应用程序(Application.application.addChild(面板)),删除面板工作(Application.application.removeAllChildren();)。问题已解决。 感谢您的帮助。 Palash – user267530 2010-06-02 23:13:01