views:

28

answers:

1

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?

A: 

try (parent as MovieClip).currentStage or (parent as Object).currentStage

antpaw
I got it to work by using Application.application (e.g. Application.application.currentState)However this is very cumbersome as I have to type Application.application in front of all members and function I need to access in the outer scope. And there are ALOT of things I need this for..Is it possible to create a var which can "hold" the Application.application? - I've tried to save it in a var app:Application, but it doesnt work.
Herter