# Simulating \_global variable declaration in AS3

**URL:** <https://forum.kirupa.com/t/simulating--global-variable-declaration-in-as3/254515>\
**Category:** Uncategorized\
**Created:** [March 12, 2008, 8:50pm UTC](https://forum.kirupa.com/t/simulating--global-variable-declaration-in-as3/254515 "2008-03-12T20:50:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bojan](https://avatars.discourse-cdn.com/v4/letter/b/b782af/32.png) [@Bojan](https://forum.kirupa.com/u/Bojan)\
**Post date:** [March 12, 2008, 8:50pm UTC](https://forum.kirupa.com/t/simulating--global-variable-declaration-in-as3/254515/1 "2008-03-12T20:50:08Z")

</div>

Hi,  
I’m working with one old project right now and I have to make some changes in it (AS2).  
I want to transform code from AS2 to Flash CS3 (AS3) and now I’m having problems with global variables which are removed from AS3.

Here is a situation:  
I have lots of external SWF’s which are referencing to MainTimeline variables. Referencing variables is simple because they are defined as **\_global** in MainTimeline.  
How to solve this in AS3?  
Can I make global class which variables will be reachable in all external loaded swf’s.  
Thanks in advance
