I've been having issues with trying to get stageHeight from sprites. 

var _sprite:Sprite = new Sprite();
addChild(_sprite)
trace (_sprite.stage.stageHeight)

give me null object reference... after it's been added to the display.

And also why can't I just access it from any class that extends Sprite 
like this:

this.stage.stageHeight or like super.stage.stageHeight;


What's confusing is I am doing this with no problem in another place.  I 
just want every
sprite i make to be able to access this property.  I guess I'm left 
creating a global variable.

What's the trick with this?

THanks,
patrick




Reply via email to