xmlns:s="library://ns.adobe.com/flex/spark"
>
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:
displaySelectionLabel.text = "OK Clicked";
break;
case Alert.CANCEL:
displaySelectionLabel.text = "CANCEL Clicked";
break;
case Alert.NO:
displaySelectionLabel.text = "NO Clicked";
break;
case Alert.YES:
displaySelectionLabel.text = "YES Clicked";
break;
}
}