PDA

View Full Version : Scope Problem? - I can't refer to the main document



tibberous
April 26th, 2008, 05:28 PM
I have an external class definition for my project. It has a class inside it. That class has an event listener. I have another class, at the same level as my other class, that I need to be able to access from inside the event listener. Here is a diagram:

Documentment.as

--> Different Class

--> Class
------> EventListener


Now, is there a way I can just refer to the whole document? I tried root, but it gives me an object, that I can't seem to cast into anything. Any ideas?

tibberous
April 26th, 2008, 05:33 PM
I got it!

Make all the important variables static, then do ClassName.item.