import mx.events.CloseEvent;
import mx.controls.Alert;
import mx.events.MenuEvent;
private function showAlert(evt:MouseEvent):void {
var alert:Alert = Alert.show("Button was clicked","Alert Window Title",Alert.OK|Alert.CANCEL|Alert.NO|Alert.YES,this,onAlertClose);
}
private function onAlertClose(evt:CloseEvent):void {
switch(evt.detail) {
case Alert.OK:
lbl.text = "OK Clicked";
break;
case Alert.CANCEL:
lbl.text = "CANCEL Clicked";
break;
case Alert.NO:
lbl.text = "NO Clicked";
break;
case Alert.YES:
lbl.text = "YES Clicked";
break;
}
}