Instead of using Cookies what i want to do in Flex is have a
global variable that will be avaiable anywhere in the application.
So when a user logs in the userID variable will have the value of 2
and can be accessed anywhere in the application is this possible?
There are several ways to do this. The simplest is to create
apublic variable in the main application scope(not in a function),
use Application.application.myVar to reference that var. that
reference will work from anywhere, including apps loaded using
swfLoader. Import mx.core.Application into each component where you
need that. I create a var in each component, _app:application, and
assign it in an init function. Just saves some typing.
Another way is to use a singleton data model class. It is a
more flexible solution than global vars.