var rocks:Array = new Array(); for (var i=0; i<10; i++) { rocks[i]= new mc_Rock(); rocks[i].x=100+i*20; rocks[i].y=20; addChild(rocks[i]); }