Here is an example that shows several ways to pass data between a popup and the main app. It does not use events, which you should also look into.
http://www.cflex.net/showFileDetails.cfm?ObjectID=558 Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Saturday, December 15, 2007 6:46 PM To: [email protected] Subject: [flexcoders] Basic Question from a Flex Newbie Hello All ---- I have been using Flash and AS3 for some time now, however I am new to Flex (and this group) and looking forward to seeing all that it can do. I have come across a situation which I believe to be rather simple to resolve, yet I have been unable to do so. I have my Application file which is calling a PopUp Component created with a TitleWindow Component. I have a button in the Application file that when it's clicked will open the PopUpComponent. How can I pass a variable/parameter from the Application to the TitleWindow for the text . Here's the code I am using in Application: ------------------------------------------------------ <?xml version="1.0" encoding="utf-8"?> <mx:Script> <![CDATA[ import dialogue.SimpleDialogue; import mx.managers.PopUpManager import mx.containers.TitleWindow; private var myPopUp:TitleWindow private function showPopUp():void myPopUp = PopUpManager.createPopUp(this,dialogue.SimpleDialogue,true) as TitleWindow; PopUpManager.centerPopUp(myPopUp) } ]]> </mx:Script> <mx:Button label="Show Popup Dialogue" click="showPopUp()"></mx:Button> </mx:Application> ------------------------------------------------------------------------ -- And here's the code in the Component: --------------------------------------------- //SimpleDialogue Component <?xml version="1.0" encoding="utf-8"?> <mx:Label id="message" text="" fontSize="24"> </mx:Label> </mx:TitleWindow> ----------------------------------------------------------- Hopefully, this makes sense. If not, I would be happy to clarify. Thanks for any and all replies. SL

