Alert.show("Are you sure?", "Title", mx.controls.Alert.YES | mx.controls.Alert.NO, this, alertEventHandler);
Then create an alertEventHandler with the following code:
function alertEventHandler(event:CloseEvent):void { if(event.detail == Alert.YES) {
Or view the custom Dialog class: http://fatal-exception.co.uk/blog/?p=69
source share