0

我是 Flash Builder 的新手。我想知道是否有任何解决方案可以使用在一个 Adob​​e AIR 应用程序中打开的 flex 创建多本机窗口?并且可以选择打开多少本机窗口。谢谢你。

4

1 回答 1

0
            <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();" />
于 2013-08-23T01:56:10.910 回答