Created
January 29, 2016 22:27
-
-
Save marchbold/9041628a389d379286d9 to your computer and use it in GitHub Desktop.
Show a simple Alert Dialog using the Dialog ANE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var alert:DialogView = Dialog.service.create( | |
new AlertBuilder() | |
.setTitle( "Alert" ) | |
.setMessage( "Test Message" ) | |
.addOption( "OK", DialogAction.STYLE_POSITIVE, 0 ) | |
.build() | |
); | |
alert.addEventListener( DialogViewEvent.CLOSED, alert_closedHandler ); | |
alert.show(); | |
... | |
private function alert_closedHandler( event:DialogViewEvent ):void | |
{ | |
var alert:DialogView = DialogView(event.currentTarget); | |
alert.removeEventListener( DialogViewEvent.CLOSED, alert_closedHandler ); | |
alert.dispose(); | |
} | |
// com.distriqt.Dialog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment