# Accessing variables loaded from an external source

**URL:** <https://forum.kirupa.com/t/accessing-variables-loaded-from-an-external-source/199604>\
**Category:** Uncategorized\
**Created:** [September 4, 2006, 12:20pm UTC](https://forum.kirupa.com/t/accessing-variables-loaded-from-an-external-source/199604 "2006-09-04T12:20:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![s0lo](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@s0lo](https://forum.kirupa.com/u/s0lo)\
**Post date:** [September 4, 2006, 12:20pm UTC](https://forum.kirupa.com/t/accessing-variables-loaded-from-an-external-source/199604/1 "2006-09-04T12:20:58Z")

</div>

Hi,  
I’m trying to load variables into flash from an external source and then, depending on whether the variable is true or false, make a movieclip do something.  
so my external source is like this:

> &myVar=true&

and my loadVars is like this:

> 

var here = this;  
my\_lv = new LoadVars();  
my\_lv.load(“external.txt”);  
my\_lv.onLoad = function() {  
booVar = this.myVar;  
};

I have a text field on the main stage with a variable name of booVar and when the data is loaded in it displays ‘true’  
what i want to happen then is the movie clip on the stage to look at the variable ‘booVar’ and if its true, to start playing the movie clip  
the code inside the movieclip is like this:

> stop();  
> if(\_root.booVar == true) {  
> play()

am i just being dumb? can someone help me  
thanks in advance
