# Access to parent class variables

**URL:** <https://forum.kirupa.com/t/access-to-parent-class-variables/330422>\
**Category:** flash\
**Created:** [January 18, 2013, 1:44am UTC](https://forum.kirupa.com/t/access-to-parent-class-variables/330422 "2013-01-18T01:44:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vito\_Lipari](https://avatars.discourse-cdn.com/v4/letter/v/df705f/32.png) [@Vito\_Lipari](https://forum.kirupa.com/u/Vito_Lipari)\
**Post date:** [January 18, 2013, 1:44am UTC](https://forum.kirupa.com/t/access-to-parent-class-variables/330422/1 "2013-01-18T01:44:43Z")

</div>

[COLOR=#333333][FONT=Verdana]Hi.[/FONT][/COLOR]  
[COLOR=#333333][FONT=Verdana]I have this situation:[/FONT][/COLOR]  
[COLOR=#333333][FONT=Verdana]

```auto

public class BBB extends MovieClip{
  var id : String;
  public function BBB():void{
    // ....  
 }
  public function test():void{
    // ==========================
    trace("test v: " + parent.v);
    // ==========================
  }
}

```

[/FONT][/COLOR][COLOR=#333333][FONT=Verdana]

```auto

public class AAA extends MovieClip{
  var v : Number;
  var b : BBB;
  public function AAA():void{
    v = 125;
    b = new BBB();
    // ======================
    b.test();
    // ======================
  }
}

```

[/FONT][/COLOR]  
[COLOR=#333333][FONT=Verdana]How can i take the values of the parent class variables ???

[/FONT][/COLOR]
