Trouble loading variables

Hey,
I’m attempting to load a variable from a text file and it’s always being traced as empty. What I’m trying to do is load an RGB value from a text file so that I can modify text color on the fly. Do I need to make a movie clip of my text box or anything? I’m generating the text on the fly with code. Thanks.

mg

a/make sure the txtfile is loaded before trying to access the var
b/how is it coded?

it is done by the following on frame 1:
loadVariables(“include.txt”, this);

i’ve also tried loadvariablesnum(“include.txt”,0)

the next frame has the following code:
if (textColorB != undefined ) {
gotoAndPlay(4);
}

textColorA is my variable from the include and it’s checking to see if the variable is loaded yet

frame 3 just says go back to frame 2.

frame 4 has the following code:

trace(textColorB);

sColor = textColorB;
trace(“scolor=” + sColor);
nColor = parseInt(sColor, 16);
this.createTextField(“tfNewfield”,1,-.5,7.1,120.5,20.8);
tfNewfield.text = “No More Junk”;
tfNewfield.textColor = ncolor;
tfNewfield.border = false;
fmtEmphasis = new TextFormat();
fmtEmphasis.bold = true;
fmtEmphasis.size = 15;
fmtEmphasis.font = “Arial”;
fmtEmphasis.color = nColor;
fmtEmphasis.align = “Center”;
tfNewfield.setTextFormat(fmtEmphasis);

stop();

basically just generating my text box which always comes out black even though the rgb value in the include is a blue. also every trace comes back undefined. it’s not a very big text file but it just doesn’t seem to work. i’ve tested and put the contents of the variable in a dynamic text box and that works ok, but i can’t access the variable as a true variable it seems.

thanks for any help.
mg