# Another addChild mindmelter

**URL:** <https://forum.kirupa.com/t/another-addchild-mindmelter/241074>\
**Category:** Uncategorized\
**Created:** [October 9, 2007, 8:36pm UTC](https://forum.kirupa.com/t/another-addchild-mindmelter/241074 "2007-10-09T20:36:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kkos](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@kkos](https://forum.kirupa.com/u/kkos)\
**Post date:** [October 9, 2007, 8:36pm UTC](https://forum.kirupa.com/t/another-addchild-mindmelter/241074/1 "2007-10-09T20:36:49Z")

</div>

Please hava a look at this code:

```auto
 
public class Obj extends Sprite
 {
  public var _clip:Sprite;
  public function Obj(clip:Sprite=null)
  {
   this._clip = clip;
  }
  public function attachTo(scope:DisplayObjectContainer)
  {
   if (this._clip)
   {
    scope.addChild(this); // nothing is displayed
    // or scope.addChild(this._clip);
   }
  }
 }

```

Now i use

```auto
 
var obj = new Obj(new mc());
obj.attachTo(this.container_mc);

```

whereas the mc() is some library instance.  
Naively i would have expected that if the \_clip is a member of the Obj Class i would see it on stage when using scope.addChild(this).

But this is not the case.  
I have to add the clip directly by using scope.addChild(this.\_clip) to see it being displayed. Why is that ??

Keith
