package
{
import flash.events.Event;
public class MyClass extends MovieClip
{
public function MyClass()
{
super();
addEventListener(Event.ADDED_TO_STAGE,added);
// stage is null; try trace(stage.stagewidth); ==> null object
}
public function added(evt:Event):void{
removeEventListener(Event.ADDED_TO_STAGE,added);
// stage is not null; try trace(stage.stagewidth); ==> somevalue
}
}
}