You can do this:
myLocalVar = Application.application.myAppVar;
Often instead of using Application.application. you can use parentDocument. or parentApplication.
See FB help sys for more details.
Very Good... I got that to work!
What about the other way around? Say for example, I want to change one of the textinput.text = XXX on my sample components from my main app, can I do that?
1 person found this helpful
Simple declare the namespace where the file is located and create an instance of the component in the primary app.
If in the same folder as the main app MXML file:
xmlns:comp="*" where comp can be anything (myComponents, components, etc.)
If a sub-folder "components" of the main app MXML file:
xmlns:comp="components.*" where comp can be anything (myComponents, components, etc.)
<comp:MyFancyComponent id="myComp"/> declare an instance of the component.
Then do this:
myAppVar = myComp.myCompVar;
Wow, that was so easy I feel like an idiot.
Again... Thank you!