我只是放弃了一件奇怪的事情 - 我不能同时拥有2个弹出的TitleWindows实例。
以下是我的参考代码:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"
minHeight="600"
creationComplete="application1_creationCompleteHandler(event)">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
import mx.managers.PopUpManager;
protected function application1_creationCompleteHandler( event:FlexEvent ) : void
{
// TODO Auto-generated method stub
PopUpManager.addPopUp( w1, this );
PopUpManager.addPopUp( w2, this );
}
]]>
</fx:Script>
<s:TitleWindow id="w1" width="300" height="400">
</s:TitleWindow>
<s:TitleWindow id="w2" width="300" height="400" x="300">
</s:TitleWindow>
</s:Application>
答案 0 :(得分:1)
请参阅我的previous answer to you。创建窗口类。并按以下方式添加:
var win:MyWindow = MyWindow(PopUpManager.createPopUp(this, MyWindow));
你想要的次数。
答案 1 :(得分:0)
将addPopUp的modal属性设置为false。
PopUpManager.addPopUp( w1, this, false );
PopUpManager.addPopUp( w2, this, false );