More than one TitleWindow instance?
I just drop on a strange thing - i can not have 2 popup TitleWindows instances simultaneously.
- How can i have more than 1 TitleWindow instance which can be moved arround ?
Here is my code for a reference :
<?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>
&l开发者_JS百科t;![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>
Refer to my previous answer to you. Create your window class. And add it the following way:
var win:MyWindow = MyWindow(PopUpManager.createPopUp(this, MyWindow));
as many times as you want.
Set the modal property of the addPopUp to false.
PopUpManager.addPopUp( w1, this, false );
PopUpManager.addPopUp( w2, this, false );
精彩评论