# Class Access child on stage

**URL:** <https://forum.kirupa.com/t/class-access-child-on-stage/280546>\
**Category:** flash\
**Created:** [January 28, 2009, 7:28pm UTC](https://forum.kirupa.com/t/class-access-child-on-stage/280546 "2009-01-28T19:28:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanDaMan](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@DanDaMan](https://forum.kirupa.com/u/DanDaMan)\
**Post date:** [January 28, 2009, 7:28pm UTC](https://forum.kirupa.com/t/class-access-child-on-stage/280546/1 "2009-01-28T19:28:46Z")

</div>

I need a class code to access a child instance of another class code that is on the stage. I have a class code named Ball.as. On the Time Line is a child of the Thing class. It is call newThing. Here is the code in the Ball.as file:

```auto

package {
    import flash.display.MovieClip;
    import flash.events.*;

    public dynamic class Ball extends MovieClip {
        private var _root:Object;
        public function Ball() {
            addEventListener(Event.ADDED, beginClass);
            addEventListener(Event.ENTER_FRAME, eFrame);
        }
        private function beginClass(event:Event):void {
            _root=MovieClip(root);
            this.x=newThing.x;
            this.y=newThing.y;
        }
        private function eFrame(event:Event):void {
            // do stuff
        }
    }
}

```

I get an error message saying that newThing is an undefined property. Please help me out. I’ve been trying to figure this out for weeks with no luck. Thanks in advance.
