# addChild() doesn't seem to work

**URL:** <https://forum.kirupa.com/t/addchild-doesnt-seem-to-work/328710>\
**Category:** flash\
**Created:** [June 8, 2012, 6:53pm UTC](https://forum.kirupa.com/t/addchild-doesnt-seem-to-work/328710 "2012-06-08T18:53:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ragnoroct](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@Ragnoroct](https://forum.kirupa.com/u/Ragnoroct)\
**Post date:** [June 8, 2012, 6:53pm UTC](https://forum.kirupa.com/t/addchild-doesnt-seem-to-work/328710/1 "2012-06-08T18:53:41Z")

</div>

K, I know pretty simple right? It’s been trumping me for quite a while now though.  
I have a fla file with a movieclip with the linkage B. That fla file also imports the class by com.mysite.testing.TestClass and instances it in the actions panel.  
I also have my as file

```auto
package com.mysite.testing
{
    import flash.display.Sprite;
    import flash.display.*;
    public class TestClass extends Sprite
    {
        private var symbol1:B;
        public function TestClass()
        {
            trace("TestClass working");
            symbol1 = new B;
            addChild(symbol1);
            
        }
    }
}

```

This is the code in the actions panel

```auto
import com.mysite.testing.TestClass;
var classDodge:TestClass = new TestClass();

```

When I test it though all I get is the output panel saying TestClass working.  
This addChild seems to follow me wherever I go, new class and fla files…  
I have set the preference for class file location and I have automatically declare stage instances unchecked.  
Thanks.
