views:

296

answers:

1

Is there a way to get an instance reference to the document class to call a method of it from the stage's timeline?
I see that here's a possible solution: using a singleton
Other solution I though of is using stage.getChildAt( 0 ) but it's not very nice.
Is there an 'official' instance reference? because the document class is obviously instantiated at startup, but is that instance accessible in any way without having to use a custom solution like the ones mentioned?
Thanks.

+1  A: 

All attached DisplayObject instances have a root property. Cast this to your document class. Bingo.

spender
Bingo indeed! thanks!
Petruza