Conditional statement problem

Having trouble with a conditional statement in Flash, although I really can’t see the error.

I’m pulling a number of variables from a text file -

&color01=3 
&color02=2
&color03=1
etc

In flash I have the following code on frame 1:

loadVariables("data.txt","_root");

Then I have a number of MCs to color based on the pulled data. I’ve attached this code to the MCs (where color01 is replaced each time respectively):

onClipEvent (enterFrame) {
    var my_color:Color = new Color(this);
    if (color01 == '1') {
        my_color.setRGB(0xFF0000);
    } else if (color01 == '2') {
        my_color.setRGB(0x0000FF);
    } else if (color01 == '3') {
        my_color.setRGB(0x00FF00);
    }
}

So the data is pulled in, and the color of the MC is changed according to the txt file. Doesn’t work though - even though I know the variables are being passed to Flash as I have a dynamic text field which displays one of the vars.

Any ideas what I am missing?

Thanks