Check if added to stage

Is there a way to check if parent object is added to stage inside a class, before child is added to stage. Something like this:


public class Main extends MovieClip {
   public function Main() {
      var test:MyClass = new MyClass();
      addChild(test);
   }
}
public class MyClass extends Sprite {
   public function MyClass() {
      var test:MyOtherClass = new MyOtherClass();
      // need to set some properties of test instance
      // based on weather MyClass is added to stage or not
 
      addChild(test);
      // here it would be: if (test.parent.stage != null);
   }
}
public class MyOtherClass extends Sprite {
   public function MyOtherClass() {
      // check if MyClass is added to stage ??
   }
}