AIR AlertMXWindow Component (Toast Style)
After requests from the release of AlertWindow which extended flash.display.NativeWindow yesterday, I am releasing AlertMXWindow which extend mx.core.Window allowing for the inclusion of any mx component.
This version operates the same as the NativeWindow version rising from the lower right corner of the screen and pausing for the delay time set by the application or the default of 3 seconds. It also has the ability to bounce if delay time is set to 0 and notify is true.

The sample below shows how to use AlertMXWindow creating it with ActionScript and adding a button. This example will have a title of “My Alert Title” and will have a delay time of 3 seconds.
var a:AlertMXWindow = new AlertMXWindow();
a.title = "My Alert Title";
var b:Button = new Button();
b.label = "My Button";
a.addChild(b);
a.open();
}
The sample below shows how to use AlertMXWindow creating it with ActionScript and adding a button. This example will be 300 x 125, have a title of “My Alert Title” and will have a delay time of 5 seconds.
var a:AlertMXWindow = new AlertMXWindow();
a.title = "My Alert Title";
a.delayTime=5;
a.width=300;
a.height=125;
var b:Button = new Button();
b.label = "My Button";
a.addChild(b);
a.open();
}
The sample below shows how to use AlertMXWindow creating it with ActionScript and adding a button. This example will be 300 x 125, have a title of “My Alert Title” and will rise up and bounce until the user interacts with it.
var a:AlertMXWindow = new AlertMXWindow();
a.title = "My Alert Title";
a.delayTime=0;
a.width=300;
a.height=125;
var b:Button = new Button();
b.label = "My Button";
a.addChild(b);
a.open();
}
The sample below shows how to use AlertMXWindow creating it with ActionScript and adding a button. This example will be 300 x 125, have a title of “My Alert Title” and will rise up and remain static until the user closes it.
var a:AlertMXWindow = new AlertMXWindow();
a.title = "My Alert Title";
a.delayTime=0;
a.width=300;
a.height=125;
a.notify=false;
var b:Button = new Button();
b.label = "My Button";
a.addChild(b);
a.open();
}
The code below shows how to subclass AlertMXWindow as an MXML object:
<AlertMXWindow xmlns="com.everythingflex.air.components.*"
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
title="My Window" delayTime="5" width="300" height="100">
<mx:Button label="Button" x="116.5" y="10"/>
<mx:ColorPicker x="10" y="10"/>
<mx:ComboBox x="69" y="40"/>
</AlertMXWindow>
Download the sample application here.



December 18th, 2007 at 10:19 am
This is awesome. I needed something JUST like this for an app I’m going to write. is it possible to specify that it stay open until the user explicitly closes it? Maybe by setting a negative timeout value?
December 18th, 2007 at 10:35 am
Yes, I just updated the code so that if you pass in a delay time of 0, it will remain until the user closes the window.
January 23rd, 2008 at 4:34 pm
There is no swc file to be found. Can u please update it or give new dl site.
Please email me a reply.
Thanks!
January 23rd, 2008 at 5:18 pm
The SWC file download link is in the first paragraph here:
http://blog.everythingflex.com/apollo/components-air/
January 24th, 2008 at 12:56 pm
Hi,
Thanks for the quick reply!
I did download that EverythingFlexAIR1.zip but I could not find the source or the SWC. There are bunch of images, swf, and some properites file.
January 24th, 2008 at 1:28 pm
Right, there is no source included.
January 24th, 2008 at 3:38 pm
How about the SWC?
January 24th, 2008 at 4:02 pm
The download link at http://blog.everythingflex.com/apollo/components-air/ is a SWC. Where did you get a zip file from?
January 24th, 2008 at 4:49 pm
OK, I changed the download link at http://blog.everythingflex.com/apollo/components-air/ to a big red download image. Just click on that image for the SWC.