The code worked fine for me (latest version of Flex 3 beta and Flex 201 Hotfix 3), although I did have to change this function (added the "evt:Event" parameter bit):
private function updateText(evt:Event):void{ textLabel.text = "I am not a blank label! cool" } If you change that does it work for you? Peter ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of flexawesome Sent: Wednesday, October 24, 2007 2:50 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] MoveEvents.MOVE for Popwindow doesn't work? Hi guys, I am reading the article here for popwindow http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhel p.htm?context=LiveDocs_Book_Parts&file=layouts_065_45.html <http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhe lp.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 <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 <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> ======================================================