You are better off using custom events to pass data, and add the event listener to the system manager.
My Adobe Flex 3 Cookbook post shows how to use custom events for this purpose:
If this post answers your question or helps, please mark it as such.
Greg Lafrance - Flex 2 and 3 ACE certified
Flex / AIR Development, Training, and Support Services
You can pass the reference of the parent to the popup .. you can do something like this
var popup:PupupWindow = new PopupWindow();
popup.parentRef = this;
this would tightly couple the popup and the parent.. so, another way to do is to pas the callback fnction of the parent to the popup by the same way.
Thank you for your replay. I've look at your Adobe Flex 3 Cookbook post for custom event. But I am having difficulty to implement it in my app. Here is my problem:
in "main.mxml" I am crating a popup window called: "popup.mxml"
in "main.mxml" I have a datagrid and a button.
When selecting a datagrid row and clicking the button, a popup window is create and the value of datagrid is displayed in the popup window.
So, I am wondering where should I place addEventListener( ) and dispatchEvent ( ) functions.
addEventListener( ) can not be placed in popup.mxml because it won't be called before the popup window being created.