Sergio
Sergio

Reputation: 628

AS3/AIR - Desktop application alerts (?)

Is it possible to generate alerts in AS3 for Adobe Air desktop applications running in Win OS?

Developing in Flash CS5.

Thanks in advance.

Upvotes: 2

Views: 1848

Answers (1)

Creative Magic
Creative Magic

Reputation: 3151

Import the mx.controls.Alert class into your application, and then call the static show() method in ActionScript to display an Alert control. You cannot create an Alert control in MXML.

The Alert control closes when you select a button in the control, or press the Escape key.

More info here:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/Alert.html

There is no built in way to get native alerts in AIR with Flash, but here's a workaround: http://www.purplesquirrels.com.au/2012/03/simple-way-to-get-native-alerts-with-adobe-air/

Upvotes: 2

Related Questions