Dead simple but won't work, stupid textFormat

OK, I know this is simple. I’ve read every thread on this board pertaining to this (including senocular’s Best Of thread), done everything there and this still doesn’t work and I can’t see why.

I feel like an idiot even asking, because I’ve seen the examples and lengthy tutorials.

All I want to do, is change the color of a dynamic text field when you press a button. But I want the name of the field to be a variable.

Now, this is what’s there:

  1. the variable “_root.expinttype1” is equal to “branch” and is set elsewhere.
    1a. There is an existing dynamic field called “branch” on screen.

  2. On the button release I set the format:

expertText = new TextFormat();
expertText.color = 0xFF0000;

  1. then tell the stinking field to change.

this works --> this[“branch”].setTextFormat(expertText);
this works --> this.branch.setTextFormat(expertText);
this does not work --> this["_root.expinttype1"].setTextFormat(expertText);

Why? I set a dummy variable txt = _root.expinttype1; and even threw it into a text field to verify the data, and it shows “branch”, so why doesn’t this work?

:jail: