Hi guys, I am reading the article here for popwindow
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&file=layouts_065_45.html I am going to addEventListenser for the popwindow, if the popwindow moved, I need to update the label, it seems MoveEvent doesn't work for popwindow, any idea? THANKS A LOT ====================== MAIN XML ========================== <?xml version="1.0"?> <!-- containers\layouts\MainMyLoginForm.mxml --> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ import mx.managers.PopUpManager; import mx.core.IFlexDisplayObject; import mx.events.MoveEvent; import flash.events.MouseEvent; import MyLoginForm; private function showLogin():void { // Create a non-modal TitleWindow container. var helpWindow:IFlexDisplayObject = PopUpManager.createPopUp(this, MyLoginForm, false); helpWindow.addEventListener(MoveEvent.MOVE,updateText); } private function updateText():void{ textLabel.text = "I am not a blank label! cool" } ]]> </mx:Script> <mx:VBox width="300" height="300"> <mx:Button click="showLogin();" label="Login"/> </mx:VBox> <mx:Text id="textLabel" text="I am a blank label now"/> </mx:Application> ============================================================ ================ component: MyLoginForm.mxml =============== <?xml version="1.0"?> <!-- containers\layouts\myComponents\MyLoginForm.mxml --> <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ import mx.managers.PopUpManager; private function processLogin():void { // Check credentials (not shown) then remove pop up. PopUpManager.removePopUp(this); } ]]> </mx:Script> <mx:Form> <mx:FormItem label="User Name"> <mx:TextInput id="username" width="100%"/> </mx:FormItem> <mx:FormItem label="Password"> <mx:TextInput id="password" displayAsPassword="true" width="100%"/> </mx:FormItem> </mx:Form> <mx:HBox> <mx:Button click="processLogin();" label="OK"/> <mx:Button label="Cancel" click="PopUpManager.removePopUp(this);"/> </mx:HBox> </mx:TitleWindow> ======================================================

