If all 27 have the same texture, i would do: var aMaterial:BitmapMaterial = new BitmapMaterial(bmp, etc);
for(var i:uint; i<27; i++)
{
var cube:Cube = new Cube();
cube.material = aMaterial;
etc...
}
If all 27 have the same texture, i would do: var aMaterial:BitmapMaterial = new BitmapMaterial(bmp, etc);
for(var i:uint; i<27; i++)
{
var cube:Cube = new Cube();
cube.material = aMaterial;
etc...
}