Skip to content

Instantly share code, notes, and snippets.

@marchbold
Created January 29, 2016 22:27
Show Gist options
  • Save marchbold/9041628a389d379286d9 to your computer and use it in GitHub Desktop.
Save marchbold/9041628a389d379286d9 to your computer and use it in GitHub Desktop.
Show a simple Alert Dialog using the Dialog ANE
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