# addChild to stage instance from static class?

**URL:** <https://forum.kirupa.com/t/addchild-to-stage-instance-from-static-class/325797>\
**Category:** Uncategorized\
**Created:** [November 4, 2011, 3:15pm UTC](https://forum.kirupa.com/t/addchild-to-stage-instance-from-static-class/325797 "2011-11-04T15:15:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uli](https://avatars.discourse-cdn.com/v4/letter/u/ccd318/32.png) [@Uli](https://forum.kirupa.com/u/Uli)\
**Post date:** [November 4, 2011, 3:15pm UTC](https://forum.kirupa.com/t/addchild-to-stage-instance-from-static-class/325797/1 "2011-11-04T15:15:10Z")

</div>

Hello !

Here’s my issue. I need to know when an element is added to the stage (using main document class). So i use :

```auto
 public override function addChild(__child:DisplayObject):DisplayObject{
	super.addChild(__child);
	trace("child added");			
	return __child;
}

```

Which works fine. I also use a static class, to which i pass the stage using :

```auto
public static function setStage(__stage:Stage):void{
	_stage = __stage;
}

```

But if i add to the stage (\_stage) a MovieClip from the static class, my “real” stage doesn’t seem to get that something was added. So i guess \_stage !== stage.  
So why is this happening, why is \_stage not getting the methods of stage ?

Thanks 🙂
