In my custom component (Login), I create and set a variable userName, it is bindable:
[Bindable] private var userName:String;
userName = txtUsername.text;
I need to pass that variable to a different custom component (Overview), here is the code of the viewstack:
<mx:ViewStack id="mainViewStack" x="76" y="90" width="800" height="400">
<components:Login />
<components:Overview />
</mx:ViewStack>
I’ve searched for a way, but I haven’t found one that does the trick.
Thank you.
You have to set this variable to public:
and then you can pass it like that (supposing userName is a property of
Login):