In the Application (MyApplication.mxml):

<s:Application xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx"
      xmlns:fx="http://ns.adobe.com/mxml/2009";
      creationComplete="init()">
        <fx:Script>
<![CDATA[

                        public static var instance:MyApplication;
                        public var title:String = 'Title';

private function init():void
{
instance=this;
}
]]>
</fx:Script>
</s:Application>

Then you use it like this from other MXML:

MyApplication.instance.title;

-- 
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