Cancel button Alert dialog
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.controls.Alert;
import mx.events.CloseEvent;
private function showAlert(event:Event):void {
var alert:Alert = Alert.show("button clicked.","Important Message",Alert.CANCEL);
}
</mx:Script>
<mx:VBox>
<mx:Button id="button" label="Show Alert" click="showAlert(event)" />
<mx:TextInput id="textInput" />
</mx:VBox>
</mx:Application>
Related examples in the same category