# Basic understanding of how classes are working

**URL:** <https://forum.kirupa.com/t/basic-understanding-of-how-classes-are-working/332188>\
**Category:** Uncategorized\
**Created:** [February 24, 2014, 7:42am UTC](https://forum.kirupa.com/t/basic-understanding-of-how-classes-are-working/332188 "2014-02-24T07:42:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![avocado](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@avocado](https://forum.kirupa.com/u/avocado)\
**Post date:** [February 24, 2014, 7:42am UTC](https://forum.kirupa.com/t/basic-understanding-of-how-classes-are-working/332188/1 "2014-02-24T07:42:42Z")

</div>

i am working with flashDevelop, following a actionscript book and trying to make a simple test (that is not working):  
this is my document class:

```auto
package  
{
import flash.display.Sprite;
    public class SubClass extends SuperClass
    {        
        public function SubClass() 
        {
            trace(SuperClass.className);            
        }        
    }
}

```

and this is the SuperClass:

```auto
package  
{
    public class SuperClass 
    {
        static public var className:String = "SuperClass";        
    }
}

```

and i get an error :  
exception, information=TypeError: Error #2023: Class SubClass$ must inherit from Sprite to link to the root.
