One of those things… The event ADDED_TO_STAGE, dispatched by any DisplayObject when it gets added to the stage (duh) as opposed to added to a parent, wasn’t available in Flash player 9 before 9.0.28. That basically means we can’t really trust it will be available until statistics prove that any and all minor releases prior to that one have disappeared from the face of the earth. So instead of that, we have to use Moock’s solution (but that’s a hell of a lot of work to be notified of just one little event), or check the event’s phase (also thanks to Moock): 

  1. private function handleAdded (e : Event) : void {
  2.     if (e.eventPhase != EventPhase.AT_TARGET) return;
  3.     // do something useful
  4. }
25 Dec, 2007, 0:42 o'clock

Add your own comment or set a trackback

Currently no comments

  1. No comment yet

Add your own comment



Follow comments according to this article through a RSS 2.0 feed

Twitter

Flickr

www.flickr.com
This is a Flickr badge showing public photos from AcidCats. Make your own badge here.