[F8] Using external varibles and if-statement. Please Help

Hi everyone,

I am trying to control some of the global variables in my script through an external text file. Is that possible?

I have a variable called "_global.scrollOrNot, which determines whether I want flash to use the text window with a scroll-bar or the one without a scroll-bar. I am trying to control that through an external text-file called “ScrollCommand.txt”. Here is my code:
frame1:

_global.scrollOrNot;

frame2:

sbScroll = new LoadVars();
sbScroll.load(“ScrollCommand.txt”);
sbScroll.onLoad = function(success) {
if (success) {
_global.scrollOrNot = sbScroll.sb1WindowScroll;
}
};
**frame3:
**trace(_global.scrollOrNot);
//this works wonderfully and traces “yes”, exactly as is in my external txt

frame4:
if (_global.scrollOrNot == “yes”) {
_root.attachMovie(“MC_TextFeldSB1”, “sbBodyField_mc”, 10, {_x:12, _y:32});
} else {
_root.attachMovie(“MC_TextFeldSB1noscroll”, “sbBodyField_mc”, 10, {_x:12, _y:26});
}

//this is were I have a problem. :puzzled: It will always choose “MCtextFeldSB1noscroll”. I have tested the whole thing with other variables, which were not changed by any LoadVars function and it works just fine then. As soon as I change the variable using the LoadVars function it will not work any more. Can anybody help?