# Access a var inside a child MC

**URL:** <https://forum.kirupa.com/t/access-a-var-inside-a-child-mc/279480>\
**Category:** flash\
**Created:** [January 15, 2009, 5:14am UTC](https://forum.kirupa.com/t/access-a-var-inside-a-child-mc/279480 "2009-01-15T05:14:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![androofus](https://avatars.discourse-cdn.com/v4/letter/a/858c86/32.png) [@androofus](https://forum.kirupa.com/u/androofus)\
**Post date:** [January 15, 2009, 5:14am UTC](https://forum.kirupa.com/t/access-a-var-inside-a-child-mc/279480/1 "2009-01-15T05:14:18Z")

</div>

Hi,

I’m new to AS3 and have a movie clip on the stage that contains a var,

the MC is called “myMC”  
ie

```auto
var path = "my path";//this is in the first frame of myMC

```

I want to access this value from the parent element, in this case it is the stage.

So on the first frame on my stage i have,

```auto
 
trace(myMC.path);// this returns underfined

```

This would work in AS2.

Can i access this or do i need to create a class to access vars of a child?

Thanks in advance.

PS, i have had a good hunt arround for this simple problem but can only find solutions for accessing the stage properties from within a child grrr.

Cool
