# Variables inside class

**URL:** <https://forum.kirupa.com/t/variables-inside-class/209665>\
**Category:** flash\
**Created:** [December 11, 2006, 12:24pm UTC](https://forum.kirupa.com/t/variables-inside-class/209665 "2006-12-11T12:24:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fshuja](https://avatars.discourse-cdn.com/v4/letter/f/5daacb/32.png) [@fshuja](https://forum.kirupa.com/u/fshuja)\
**Post date:** [December 11, 2006, 12:24pm UTC](https://forum.kirupa.com/t/variables-inside-class/209665/1 "2006-12-11T12:24:03Z")

</div>

hi,  
i am creating my own component. the problem is how can i access the variables inside the Class without using \_root.myComponentName.variableName.  
check out the code.

class Loader extends MovieClip {  
private var \_\_maskHeight:Number = 450;

```
    Loader(){
             //create some movieClip here
             movieClip.onLoad = function():Void{
                 //how can i access the __maskHeight variable here
                 //when i trace it, it shows me undefined
             }
    }

```

}

Faraz
