For loop in class

This loop worked great on the timeline. I am now trying to make it a class. It appears to work except I only get the last item in the array. Not sure how to fix.

colorHolder_mc is added prior to the loop.


for (var inc:uint = 0; inc < sqColor.length; inc++) {
             lf2.color = sqColor[inc].lf;
             rf2.color = sqColor[inc].rf;
             cube.name = "sqi"+inc;
             cl.name = "sqL"+inc;
             cr.name = "sqR"+inc;
             btn.name = sqColor[inc].nme;
             btn.x = sqColor[inc].xcoor;
             btn.y = sqColor[inc].ycoor;
             cube.x = sqColor[inc].xcoor;
             cube.y = sqColor[inc].ycoor;
             cl.x = cl.y = 0;
             cr.x = 37;
             colorHolder_mc.addChild(cube);
             cube.addChild(cl);
             cube.addChild(cr);
             colorHolder_mc.addChild(btn);
             cl.transform.colorTransform = lf2;
             cr.transform.colorTransform = rf2;
             colorHolder_mc.addEventListener(MouseEvent.CLICK, changeColor);
        };//end loop