Problems within a loop

We created the below loop and it counts correctly, but is not effecting the alpha of the buttons. We have 30 buttons with images called but1, but2, but3, etc. It seems like the b._alpha is not being recognized as but1._alpha. If we trace b, we get the correct string “but1” though.

var curButton = 3;

    for (var i:Number = 1; i <= 30; i++) {
        var xx = String(i);
        var b = ("but" + xx);
        if (i == curButton) {
            b._alpha = 100;
            }
         else {
            b._alpha = 50;
            }