# Movieclip read variable from main timeline?

**URL:** <https://forum.kirupa.com/t/movieclip-read-variable-from-main-timeline/313270>\
**Category:** flash\
**Created:** [August 25, 2010, 10:23am UTC](https://forum.kirupa.com/t/movieclip-read-variable-from-main-timeline/313270 "2010-08-25T10:23:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![seventy9](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@seventy9](https://forum.kirupa.com/u/seventy9)\
**Post date:** [August 25, 2010, 10:23am UTC](https://forum.kirupa.com/t/movieclip-read-variable-from-main-timeline/313270/1 "2010-08-25T10:23:04Z")

</div>

I declared a variable & it’s value in the main timeline. Then I created a movieclip and have some actionscript inside that movieclip. Is it possible to read the varialbe’s value within the movieclip?

Let’s say I have this variable in root timeline  
[COLOR=“DarkRed”]var myVar:Number = 100;[/COLOR]  
and I want to read myVar’s value within a movieclip like following  
[COLOR=“DarkRed”]trace(root.myVar);[/COLOR]

Any help?
