# How to pass variables values from movie clips to the main stage

**URL:** <https://forum.kirupa.com/t/how-to-pass-variables-values-from-movie-clips-to-the-main-stage/93619>\
**Category:** Uncategorized\
**Created:** [November 2, 2003, 11:47pm UTC](https://forum.kirupa.com/t/how-to-pass-variables-values-from-movie-clips-to-the-main-stage/93619 "2003-11-02T23:47:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![libman](https://avatars.discourse-cdn.com/v4/letter/l/50afbb/32.png) [@libman](https://forum.kirupa.com/u/libman)\
**Post date:** [November 2, 2003, 11:47pm UTC](https://forum.kirupa.com/t/how-to-pass-variables-values-from-movie-clips-to-the-main-stage/93619/1 "2003-11-02T23:47:25Z")

</div>

Hi all,

Newbie here. I have been studying up a storm but the learning curve is steep.

I’m perplexed by passing variables from a movie clip to the main stage.

I have a movie clip with an instance name mc1 on the main stage. In that movie clip I declared a variable

c = 5;

on the first frame inside the mc1 movie clip.

I thought I could access that variable inside mc1 from the main stage by placing this on the first frame of the main stage:

x = \_root.mc1.c;

Obviously I don’t understand what is going on in terms of scope of variables because I keep getting an undefined statement in my variable x.

Some insight would be appreciated.

* * *

Thanks,  
Greg
