Hi,

1. Use one common actionscript *singleton class*.
2. Declare the variables what ever you need in that class.
3. Then store the data in that class variables and retrieve those dats in
the main.mxml

Here the class is used as Bridge between the components / Modules as our
wish.




*Abdul | Flex Snippet:* *http://abdulthought.blogspot.com/*






On 29 July 2010 17:32, Salah <[email protected]> wrote:

> hi,
> i'm new in Flex and i need your help !!
>
> i need to share variable between a main.mxml and a popup.mxml
> for example :
>
>
> 1-popup.mxml
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml";
>                                width="248" height="204"
>                                title="window pop-up"
>                                showCloseButton="true"
>                                close="closePopUp()" >
>        <mx:Script>
>                <![CDATA[
>                        import mx.managers.PopUpManager
>                                public var myData:String="";
>                                public function closePopUp():void
>                                {
>                                        PopUpManager.removePopUp(this);
>                                }
>                ]]>
>        </mx:Script>
>        <mx:TextInput id="txt_message" />
>        <mx:Button label="Ok" id="btn_ok"/>
> </mx:TitleWindow>
>
>
> 2- main.xml
> ....
> ...
> <mx:TextInput id="txt"/>
>
>
> on clicking button OK in the popup window , the text on  "txt_message"
> should appear on "txt"
> i must do it without parentApllication !!
>
> please help
>

-- 
*With Regards*,
*Nizar.*
*Disturb @ (+91) 9790503327*

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to