Excellent - thanks all of you -

Your help is most appreciated,

Mike

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Friday, April 04, 2008 1:28 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] When can I access the Stage Object?

You have instant access to it via systemManager.stage

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Muzak
Sent: Friday, April 04, 2008 11:24 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] When can I access the Stage Object?

Application.applicationComplete
http://livedocs.adobe.com/flex/2/langref/mx/core/Application.html#eventS
ummary

Fires right after creationComplete, but the stage property will be
available.


----- Original Message -----
From: "Mike Anderson" <[EMAIL PROTECTED]>
To: <flexcoders@yahoogroups.com>
Sent: Friday, April 04, 2008 8:13 PM
Subject: [flexcoders] When can I access the Stage Object?


Hello All,

In my main <mx:Application> I am attempting to add an Event Listener to
the Stage Object, after the CreationComplete Event is triggered.  Upon
application startup, I get that wonderful error dialog stating:

    "Cannot access a property or method of a null object reference."

I want to play around with some validate() stuff, in order to speed up
my Flex Resizing issues.  This is what I have for my code:

private function onApplication_CreationComplete( event:FlexEvent ):void
{
    stage.addEventListener( Event.RESIZE, onStage_Resize );
}

private function onStage_Resize( event:Event ):void
{
    this.validateNow();
}

So the question is, is the Stage Object not yet available?  Do I need to
place this Event Listener on a Child Object contained within my
Application?

Any thoughts on this would be greatly appreciated :)

Mike


------------------------------------

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
Links




------------------------------------

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
Links



Reply via email to