# Variable scope

**URL:** https://forum.kirupa.com/t/variable-scope/257970
**Category:** Uncategorized
**Created:** [April 18, 2008, 10:36pm UTC](https://forum.kirupa.com/t/variable-scope/257970 "2008-04-18T22:36:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![petran](https://avatars.discourse-cdn.com/v4/letter/p/4491bb/32.png) [@petran](https://forum.kirupa.com/u/petran)
#### Post date: [April 18, 2008, 10:36pm UTC](https://forum.kirupa.com/t/variable-scope/257970/1 "2008-04-18T22:36:18Z")

</div>

ok I have a class wich has this

public static var XmlToArray:Array = new Array();

now when i trace this from inside a class’s function

public function trace() {

trace(XmlToArray\*.url);

it traces. But when I am trying to trace it from inside a function that a define as a listener :

tmpTimer.addEventListener(TimerEvent.TIMER, function tmp() {  
trace(XmlToArray\*.url);  
}

traces null so I guess the tmp is not a member of my class and can’t see the array. when can I do to get access to the array.
