# Accessing a non-class variable from inside a class defined in ActionScript

**URL:** <https://forum.kirupa.com/t/accessing-a-non-class-variable-from-inside-a-class-defined-in-actionscript/233947>\
**Category:** flash\
**Created:** [July 28, 2007, 4:08pm UTC](https://forum.kirupa.com/t/accessing-a-non-class-variable-from-inside-a-class-defined-in-actionscript/233947 "2007-07-28T16:08:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zomis](https://avatars.discourse-cdn.com/v4/letter/z/e56c9b/32.png) [@Zomis](https://forum.kirupa.com/u/Zomis)\
**Post date:** [July 28, 2007, 4:08pm UTC](https://forum.kirupa.com/t/accessing-a-non-class-variable-from-inside-a-class-defined-in-actionscript/233947/1 "2007-07-28T16:08:57Z")

</div>

In my main timeline, I’ve got a multidimensional array variable named “map”.  
On frame 1, this “map” variable is filled up with instances of a class named “maparea” (defined in an external actionscript file), but now I’d like to add a function named “neighbourcheck” in the “maparea” class, which will go through it’s neighbours on the map and check some properties on them.

But how can I access the main timeline variable “map” from inside my “maparea” class?

I’ve tried to use “\_global.map” but that left me with the error “1120: Access of undefined property \_global.”
