A real native Alert for Flex / Air
On May 3, 2009, Air,Components,Flex - 6 CommentsWhen you’re working on an Air project in Flex, and you want an alert to popup, you have a problem. Air doesn’t come with an ‘aired’ version of the Flex Alert. The flex Alert is fine, as long as you work with a single windowed application. As soon as you have more than one window, the Alert of Flex becomes more or less useless. Since you’ve got more than 1 window, Flex doesn’t know which window to make the parent window, so a model alert isn’t possible anymore.
I’ve taken the code from the mx.Alert and rewritten it to an AirAlert. It works exactly as the normal alert, only now it creates a window instead of a Panel / Titlewindow.
Usage: AirAlert.show(‘Test Alert!’, ‘Test Alert!’);
(The same as a normal alert
)
Notice: I didn’t copy the Alert.YES / Alert.NO stuff, so you have to use those from the Alert class.
Notice2: You’ll find no license or whatsoever, just use it as you like.
What others have to say:
[...] AirAlert Ids Klijsma [...]
Wow!!
Thanks for this, but one help I need from you is that can you help to post the Flash CS3 Air version of this?
I will really appreciate this.
No, sorry, it’s based on the Flex Alert component, so it uses classes which are not available in flash.
Do you have a version of this that works in Flex 4? This version won’t compile with Flex 4.
Thanks,
Mark.
Not yet, but I don’t think I’ll come up with one that does very soon… (kinda busy at the moment
)
What compile errors does FB give?
May be you will be interested in this project(developer of this project might be interested too):
http://code.google.com/p/as3nativealertlib/
To make superior alerts for AIR.
Leave a Reply