How can I show an confirmation message in Actionscript 3 ?
I use Adobe Flex 3 and as3 for Air application
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) {
// pressed yes.
}
}
Or check out a custom Dialog class: http://fatal-exception.co.uk/blog/?p=69
您可以使用Alert类。
Alert.show(...);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.