# Using constants in an extended class

**URL:** <https://forum.kirupa.com/t/using-constants-in-an-extended-class/329832>\
**Category:** flash\
**Created:** [October 22, 2012, 10:22am UTC](https://forum.kirupa.com/t/using-constants-in-an-extended-class/329832 "2012-10-22T10:22:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GiGaGiG](https://avatars.discourse-cdn.com/v4/letter/g/a88e57/32.png) [@GiGaGiG](https://forum.kirupa.com/u/GiGaGiG)\
**Post date:** [October 22, 2012, 10:22am UTC](https://forum.kirupa.com/t/using-constants-in-an-extended-class/329832/1 "2012-10-22T10:22:49Z")

</div>

Hi,  
I am having troubles using an extended class:  
Class B extends class A (that extends MovieClip)  
Class A defines a series of public static consts  
I’d like to use the A consts through the B instance, but they are not visible.

i.e.:  
A defines

```auto
public static const testString: String = "test";

```

```auto
testInst = new B();
trace(testInst.testString);

```

gives me an error, as if testString was not public.

Why? Am I missing a very stupid detail?
