i'm new in flash builder. i would like to know if there any solution to create a multi native window using flex which open in one Adobe AIR application? and there are given a choice to select how many native window to open. thank you.
0
votes
1 Answers
0
votes
<fx:Script>
<![CDATA[
import mx.core.Window;
private function btn_click():void
{
var opts:NativeWindowInitOptions = new NativeWindowInitOptions();
opts.type = NativeWindowType.NORMAL; //NativeWindowType.NORMAL, NativeWindowType.UTILITY
var nativewin:NativeWindow;
for(var num:int = 0; num< comboBox.selectedItem; num++)
{
nativewin = new NativeWindow(opts);
nativewin.width = 320;
nativewin.height = 200;
nativewin.activate();
}
}
]]>
</fx:Script>
<mx:ApplicationControlBar dock="true">
<mx:Label text="buttonAlignment:"/>
<mx:ComboBox id="comboBox"
dataProvider="[1,2,3,4]" />
</mx:ApplicationControlBar>
<mx:Button label="Launch {comboBox.selectedItem} window"
click="btn_click();" />