# Quick Inheritance Question

**URL:** <https://forum.kirupa.com/t/quick-inheritance-question/284289>\
**Category:** flash\
**Created:** [March 17, 2009, 4:55pm UTC](https://forum.kirupa.com/t/quick-inheritance-question/284289 "2009-03-17T16:55:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joegardner](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@joegardner](https://forum.kirupa.com/u/joegardner)\
**Post date:** [March 17, 2009, 4:55pm UTC](https://forum.kirupa.com/t/quick-inheritance-question/284289/1 "2009-03-17T16:55:25Z")

</div>

Hi guys,

I have just begun using inheritence and so I’m testing it out as simply as I can. I understand the basics of it but have problems when adding movieclips to the display list in the host file.

Here’s the code for the host file which has a movieClip in the library called MapBackMc :

// MapTest.as  
package  
{  
import flash.display.Sprite;  
import flash.events.\*;

```
public class MapTest extends Sprite
{
    // public classes
    public var country:String = "china";
    
    private var back:Sprite = new MapBackMc();
    
    public function MapTest()
    {
        addChild(back);
    }
}

```

}

and here’s the code for the file which inherits the host (at this stage I only really want to get the country variable from the MapTest host file, this will change later):

// Country.as  
package  
{  
import flash.display.\*;

```
// import custom classes 
import Countries.Background;
import Countries.Character;

public class Country extends MapTest
{
    
    public function Country()
    {
        var back = new Background(country);
        addChild(back);
        
        var character = new Character(country);
        addChild(character);
    }
}

```

}

And here’s the error I get :

1180: Call to a possibly undefined method MapBackMc.

Now I understand that the Country file is trying to access the library symbol MapBackMc and can’t but this shouldn’t even happen if the variable is private right?

Thanks in advance!
