手動關閉Alert組件的方法

正常關閉Alert組件的方法是在介面上按下是、否、取消的按鈕後即自動關閉,並且可以指定觸發的處理事件。

但實際使用時發現,Alert本身並沒有提供關閉視窗的方法,如果要經由程式來關閉Alert的話,可以使用PopupManager提供的方法。

import mx.managers.PopUpManager;

var alert : Alert = Alert.show( message );

PopUpManager.removePopUp( alert ); 

留言

這個網誌中的熱門文章

3dmax的biped如何使用CMU的免費motion capture資源

如何在AS3 project中使用Flex的mx.utils類別庫?

如何把3dmax的physique轉成skin