import mx.controls.Alert; import mx.events.CloseEvent; private function showAlert(event:Event):void { var alert:Alert = Alert.show("button clicked.","Message",Alert.OK | Alert.CANCEL); }