[Flashcoders] Synchronous code?

2010-03-09 Thread Glen Pike
Hi, More of a strange encounter that I would like to share / get some input on than something I need to fix this one... I have recently encountered an issue where I am getting null for the stage property of a Sprite subclass in it's event handler for ADDED_TO_STAGE. I have managed to

Re: [Flashcoders] Synchronous code?

2010-03-09 Thread jonathan howe
Hi, Glen, Sounds pretty wacky to me. I'm going to ask a dumb question just to be sure... In the code snippet, the event handler is inside the Sprite subclass itself? In other words, I wanted to make sure that your reference to stage is indeed the property of the event source, i.e. would this be

Re: [Flashcoders] Synchronous code?

2010-03-09 Thread Glen Pike
Hi, The added to stage handler is inside the Sprite subclass: public function GenericButton(attrs:* = null){ this.attrs = attrs; addEventListener(Event.ADDED_TO_STAGE, _addedToStageHandler, false, 0, true); addEventListener(Event.REMOVED_FROM_STAGE,