Flex:从Alert.Show中删除OK按钮?

cho*_*hoc 2 apache-flex

我可以从Alert.Show()消息中删除OK按钮,该消息默认显示吗?

谢谢

更新:

private var myAlert : Alert;

public function showAlert( message: String, title : String ) : void
{
    hideAlert();

    myAlert = Alert.show( message, title);
}

public function hideAlert() : void
{
    if( myAlert != null && myAlert.visible ) {
        myAlert.visible = false;
    }
}
Run Code Online (Sandbox Code Playgroud)

Mat*_*ean 7

这也应该有效:

import mx.core.mx_internal;
use namespace mx_internal;

private var theAlert:Alert;

public function showAlert():void
{
  theAlert = Alert.show("Saving Changes...", "", Alert.OK);
  theAlert.mx_internal::alertForm.removeChild(
    theAlert.mx_internal::alertForm.mx_internal::buttons[0]);
}

public function hideAlert():void
{
  PopUpManager.removePopUp(theAlert);
}
Run Code Online (Sandbox Code Playgroud)