14-09-2009

Actionscript3 ADDED event listener

The stage object can only be accessed after an object has been added to the display list.


public class Test extends Sprite
{
	public function Test()
	{
		this.addEventListener(Event.ADDED, addedListener);
	}
 
	private function addedListener(evt:Event):void
	{
		trace(this.stage);
	}
}

Comments:

Your comment:

»

 

[x]