How do i dynamicly declares private vars?

Hi there,

I have 20 cubes and i like to know how to dynamicly declare them



public class Dia01 extends BasicView {
    var i:int;
    for (i = 0; i < 10; i++ ) {
    private var cube:Cube = this["cube" + i ];
    }

//private var cube0:Cube;
    //private var cube1:Cube;
    //private var cube2:Cube;
    //private var cube3:Cube;



above didn’t work

2/ i have 4 different color states for each cube and i am thinking of using a matrix to color the cubes. Any tips or suggestion?

regards