# cs4 Using root properties in a class

**URL:** <https://forum.kirupa.com/t/cs4-using-root-properties-in-a-class/292476>\
**Category:** Uncategorized\
**Created:** [July 14, 2009, 5:30pm UTC](https://forum.kirupa.com/t/cs4-using-root-properties-in-a-class/292476 "2009-07-14T17:30:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mothmann](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mothmann](https://forum.kirupa.com/u/mothmann)\
**Post date:** [July 14, 2009, 5:30pm UTC](https://forum.kirupa.com/t/cs4-using-root-properties-in-a-class/292476/1 "2009-07-14T17:30:34Z")

</div>

i have a class .as file which extends MovieClip. inside the .as file there is a public function and when called upon it needs to change the value of a property that is on the maintimeline

```auto
package
{
    import flash.display.*
    public class TEST extends MovieClip
    {
        public function TEST()
        {
            this.x = 500;
        }
        public function changeGears(){
            this.parent.gear_num += 1;  
        }
    }
}

```

problem is this error

1119: Access of possibly undefined property gear\_num through a reference with static type flash.display:DisplayObjectContainer.
