You must import the Stage Class, and try to trace it again.

On 4/10/07, Muzak <[EMAIL PROTECTED]> wrote:

If I'm not mistaken the stage property is one of the last things that gets
created/defined (oddly enough).

You'll have to listen to one of the available events and see which one is
invoked after the stage property has been set (I'm not
sure which one is the best candidate really). Try listening for the "
Event.ADDED_TO_STAGE" event.

regards,
Muzak

----- Original Message -----
From: "ilteris kaplan" <[EMAIL PROTECTED]>
To: "Flash Lists" <[email protected]>
Sent: Tuesday, April 10, 2007 12:18 AM
Subject: [Flashcoders] [as3] using stage.stageWidth property in a
constructor


> Hello Flash Folks,
>
> I am trying to access stage.stageWidth property in order to be able  to
give certain x,y values to my objects when they are
> created. So  when I went ahead tried to use stage.stageWidth by just
tracing like  trace(stage.stageWidth);
> this causing flash player 9 to throw an error to me:
>
> TypeError: Error #1009: Cannot access a property or method of a
null  object reference.
> at ParticleManager$iinit()
> at Moodbox2$iinit()
>
> so what I am guessing is stage object is not instantiated when I
am  trying to call it. Anyone know any workaround for this?
>
> best,
> ilteris


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




--
愿平原上的风指引我们的方向。
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to