2010-06-02 25 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