# Inheritance issues

**URL:** <https://forum.kirupa.com/t/inheritance-issues/252824>\
**Category:** Uncategorized\
**Created:** [February 24, 2008, 3:13am UTC](https://forum.kirupa.com/t/inheritance-issues/252824 "2008-02-24T03:13:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theozero](https://avatars.discourse-cdn.com/v4/letter/t/b19c9b/32.png) [@theozero](https://forum.kirupa.com/u/theozero)\
**Post date:** [February 24, 2008, 3:13am UTC](https://forum.kirupa.com/t/inheritance-issues/252824/1 "2008-02-24T03:13:31Z")

</div>

So im having some issues with inheritance and its driving me crazy. Heres the situation.

I have a class, and a few movieclips in my library have this class set as their base class in the linkage settings. It refers to some manually added element in its constructor like so:

```auto

public class GenericBaseClass extends MovieClip{
   public function GenericBaseClass(){
     this.clip1.x = 50;
   }
}

```

As long as all of the movie clips that use this as a base class have an element in their first frame called clip1, everything works fine.

Now say I want to extend GenericBaseClass to add more functionality like this:

```auto

public class SpecificClass extends GenericBaseClass {
   public function SpecificClass(){
      this.clip1.y = 100;
      super();
   }
}

```

I get a 1119 error that clip1 is possibly undefined. basically the constructor from GenericBaseClass can no longer find clip1.

So my question is: How can I write a class that will access some elements manually added to the stage and then subclass it to add more functionality?

any help is much appreciated, its been driving me nuts…
