Re: [Flashcoders] stageHeight issues AS3
var _sprite:Sprite = new Sprite(); addChild(_sprite) trace (_sprite.stage.stageHeight) give me null object reference... even after it's been added to the display. Are you sure that the DisplayObjectContainer the above code resides in is added to the display list already? And its parents? Cheers, Claus. -- claus wahlers cĂ´deazur brasil http://codeazur.com.br/ http://wahlers.com.br/claus/blog/ ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] stageHeight issues AS3
Please don't cross-post. - Original Message - From: {reduxdj} [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, March 08, 2007 5:06 PM Subject: [Flashcoders] stageHeight issues AS3 I've been having issues with trying to get stageHeight from every sprite. Getting the height is a hit or miss thing for me. var _sprite:Sprite = new Sprite(); addChild(_sprite) trace (_sprite.stage.stageHeight) give me null object reference... even 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, but only successfully in one place. I just want every sprite i make to be able to access this property. I guess I'm left creating a global variable. Thanks, Patrick ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] stageHeight issues AS3
Of course. Thanks, Patrickk Claus Wahlers wrote: var _sprite:Sprite = new Sprite(); addChild(_sprite) trace (_sprite.stage.stageHeight) give me null object reference... even after it's been added to the display. Are you sure that the DisplayObjectContainer the above code resides in is added to the display list already? And its parents? Cheers, Claus. ___ Flashcoders@chattyfig.figleaf.com 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