ActionScript 3 - access variables in main application class from instantiated class

Posted by Herter on Stack Overflow See other posts from Stack Overflow or by Herter
Published on 2010-04-08T09:19:41Z Indexed on 2010/04/08 9:23 UTC
Read the original article Hit count: 104

Filed under:

I have a initApp.as which instantiates a class which needs to access the "currentState" property and the States array as well. However we cannot get this to work as we cannot see how we can access this information.

Within initApp.as currentState is accessed via "this.currentState". This does not work in the class which is instatiated within initApp.as. The following error is thrown:

"Access of undefined property currentState."

Anyone know how this can be solved?

© Stack Overflow or respective owner

Related posts about actionscript-3