I am having problems with a variable that I am loading using loadVariablesNum("vars.php", 0, "POST"); to bring in variables from an outside file source. The problem is that when I use an IF statement outside a function the variable(s) are not recognized inside the IF statements, but the variables are rcognized inside functions, for example

Actionscript:
loadVariablesNum("vars.php", 0, "POST");
if(waVar == 1){
_root.map.state1.gotoAndStop(2);
}
****The variable waVar is not recognized in the usage above, but is recognized in the function below, both are saved on the same frame's actions.

Actionscript:
_root.map.state1.onRollOver = function(){
if(waVar == 1){
this.gotoAndPlay(3);
this.swapDepths(10);
}
}
Any thoughts on how to get the waVar variable recognized in the top usage?
Thanks in advance for any help!