How to get variables in main mxml to be seen by my class?

As the title says,

how can I get access to public variables in my main .mxml application from my AS class and vice versa?

Also, say I have a main container panel defined in mxml, how can I reference to it’s id from a separate class file?

Thanks.!