# Global Variable Question

**URL:** https://forum.kirupa.com/t/global-variable-question/108079
**Category:** Uncategorized
**Created:** [April 21, 2004, 4:09pm UTC](https://forum.kirupa.com/t/global-variable-question/108079 "2004-04-21T16:09:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![danielthelion](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@danielthelion](https://forum.kirupa.com/u/danielthelion)
#### Post date: [April 21, 2004, 4:09pm UTC](https://forum.kirupa.com/t/global-variable-question/108079/1 "2004-04-21T16:09:34Z")

</div>

hey guys, so, im going through colin moock’s book, “the definitive guide”, and im learning about global variables. so in his lesson he says to do this:

1. create a movieclip called square, with a square inside of it.

2. in the square mc’s timeline, on frame 1, place this code :

\_global.day = “tuesday”;

1. go back to the main timeline and on frame one put this code:

trace(day);

no according to moock, when i run the movie, it should output “tuesday”, but all i keep getting is “undefined”.  
i’m running mx 2004, so im wondering if that has anything to do with it…any help is appreciated! -daniel
