# Accessing externally defined variables - Simples? (i hope)

**URL:** <https://forum.kirupa.com/t/accessing-externally-defined-variables-simples-i-hope/294935>\
**Category:** Uncategorized\
**Created:** [August 22, 2009, 2:52pm UTC](https://forum.kirupa.com/t/accessing-externally-defined-variables-simples-i-hope/294935 "2009-08-22T14:52:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GWick](https://avatars.discourse-cdn.com/v4/letter/g/aeb1de/32.png) [@GWick](https://forum.kirupa.com/u/GWick)\
**Post date:** [August 22, 2009, 2:52pm UTC](https://forum.kirupa.com/t/accessing-externally-defined-variables-simples-i-hope/294935/1 "2009-08-22T14:52:42Z")

</div>

Here is the problem:  
I have 2 external as3 files in a “com” folder next to the FLA within which i am working. The first of these ( “Main.as”) is the document class. The second (“events.as”) contains variable definition “myVar:Number = 0” which i want to be able to access and change inside Main.as. I am sure that this is possible, but i can’t get it working (flash very helpfully keeps pointing out that I have made an error. Specifically that old classic: “1046: Type was not found or was not a compile-time constant: myVar.” which has puzzled me since the dawn of time… or at least the dawn of actionscript 3…)

Anyway, if anyone could help i would be very thankful…

GW
