Handling Yes | No Confirmation Alert messages
A clean way to create a Yes | No confirmation popup with handling the user’s choice would be coded as follows:
Alert.show("Are you sure you wish to Deactivate this Spot?","Confirm Deactivate", Alert.YES | Alert.NO, this, deactivate, null, Alert.NO); private function deactivate(e:CloseEvent):void { if (e.detail == Alert.YES) // They clicked on Yes }
Leave a Comment