Hello, i am trying to do a mx:Module being Popuped but i am finding
this very dificult.
My classes are like this: MyWindow <- MyTitleWindow <- mx:TitleWindow
The code works very fine if i run it all together (without
modules). But when i split the swf i cannot popup MyWindow class.
here is the sample that works, but without modules. This is the
behaviour i seek. Is it possible with modules?
<?xml version="1.0" encoding="utf-8"?>
<!-- MainApp.mxml -->
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Button label="show" click="showTheWindow()"/>
<mx:Script>
<![CDATA[
import mx.managers.PopUpManagerChildList;
import mx.managers.PopUpManager;
public function showTheWindow():void {
PopUpManager.centerPopUp(
PopUpManager.createPopUp(DisplayObject(Application.application),
MyWindow, false, PopUpManagerChildList.APPLICATION) );
}
]]>
</mx:Script>
</mx:Application>
---------------------------
<?xml version="1.0" encoding="utf-8"?>
<!-- MyWindow.mxml -->
<local:MyTitleWindow
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:local="*"
width="400" height="300" showCloseButton="true"
close="PopUpManager.removePopUp(this)">
<mx:Label text="HERE IS THE WINDOW !!!"/>
<mx:Script>
<![CDATA[
import mx.managers.PopUpManager;
]]>
</mx:Script>
</local:MyTitleWindow>
--------------------------------
<?xml version="1.0" encoding="utf-8"?>
<!-- MyTitleWindow.mxml -->
<mx:TitleWindow
xmlns:mx="http://www.adobe.com/2006/mxml"
width="400" height="300">
</mx:TitleWindow>
-------------------------------
i found a PowerPoint from Alex Harui but it don't compile. I made some
adjust to compile the example but not work ok.
here is the link:
blogs.adobe.com/aharui/360*Flex*2007/*Module*s.ppt/*Module*s.ppt
can someone give any help?
- Luís Eduardo.