Hey,
I am trying to sort out what is not working in my code that places bars across the screen with a random mix of pre-defined colors.
any help?
//pre-defined array to grab colors from
var myColors:Array = new Array();
myColors[0] = "0xec5b07";
myColors[1] = "0xd1c700";
myColors[2] = "0x3f93b3";
myColors[3] = "0xaf004e";
var i:Number = 0;
for (i=1; i <= 10; ++i) {
trace("myColors.length "+myColors.length);
trace("i is "+i);
trace("color is "+myColors*);
//just placing creating empty MCs
var containerMC:MovieClip = this.createEmptyMovieClip("container_mc"+i, this.getNextHighestDepth());
//assigning each new MC with a color from the array
this["container_mc" + i].colorTo(myColors[random(4)]);
//giving each new MC some shape so you can see the color
this["container_mc" + i]._width = 10
this["container_mc" + i]._height = 50
//moving each new MC over a bit to the right
this["container_mc" + i]._x = this["container_mc" + i]._x + this["container_mc" + (i-1)]._x;
}