Hi Mahi,

Please try this.

Create a singleton class

package model
{
        [Bindable]
        public class CommonModel
        {
                public static var instance:CommonModel;

                public function CommonModel(enforcer:singletonEnforcer)
                {
                        if (enforcer == null)
                        {
                        }
                }

                public static function getInstance():CommonModel
                {
                        if (instance == null)
                        {
                                instance=new CommonModel(new 
singletonEnforcer());
                        }
                        return instance;
                }
                public var id:Number;
        }
}

class singletonEnforcer
{
}

You can access the variable 'id' from your flex components by creating
an instance of class CommonModel

-Prajilal

On Apr 21, 2:12 pm, mahi <[email protected]> wrote:
> hi,
> I have declared a global variable in my application and is there any
> way to access the value of that variable in component and update the
> value of that variable in my flex components???
> Its very urgent..
> Somebody please give a solution
>
> Thanks in advance
> Mahi

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