# Question for TheCanadian... (variable scope and such)

**URL:** <https://forum.kirupa.com/t/question-for-thecanadian-variable-scope-and-such/189501>\
**Category:** flash\
**Created:** [June 3, 2006, 3:07am UTC](https://forum.kirupa.com/t/question-for-thecanadian-variable-scope-and-such/189501 "2006-06-03T03:07:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheRiddler](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@TheRiddler](https://forum.kirupa.com/u/TheRiddler)\
**Post date:** [June 3, 2006, 3:07am UTC](https://forum.kirupa.com/t/question-for-thecanadian-variable-scope-and-such/189501/1 "2006-06-03T03:07:15Z")

</div>

A little while ago you tried to help me with [this](http://www.kirupa.com/forum/showthread.php?t=221081&highlight=TheRiddler) problem by advising me to place a “gotoAndStop(2)” at the end of the “onLoad” XML function to ensure the XML file’s been loaded before proceeding with the rest of the code.

I’ve since gotten in a position where I can test it out, and it didn’t work for me. I have data loaded from the XML file assigned to an array, and I can’t access that array outside the “onLoad” function.

I then tried putting EVERYTHING, I mean all functions, button code, everything inside the onLoad event and that didn’t work either.

I’m sorry to single you out, but you seem knowledgable about this and I need to get it working.
