If your class is a component, you may have to listen for the
ADDED_TO_STAGE event, before you can reference the stage and add things
like keyboard event listeners:
public function MyComponentClass()
{
super();
addEventListener( Event.ADDED_TO_STAGE, onAddedToStage );
}
-TH
--- In [email protected], "valdhor" <[EMAIL PROTECTED]> wrote:
>
> The Stage object is not globally accessible. You need to access it
> through the stage property of a DisplayObject instance.
>
> If your class has access to a DisplayObject use it. Else, pass it.
>
>
>
> --- In [email protected], "Dale Fraser" dale@ wrote:
> >
> > I have several classes that need access to the stage.
> >
> >
> >
> > How can classes access the stage, do I need to pass it, or is there
> a built
> > in method.
> >
> >
> >
> > Regards
> >
> > Dale Fraser
> >
>