for (i = 0; i < 50; i++) { for (j = 0; j < 50; j++) { _root.attachMovie("f", "f"+i+j, this.getNextHighestDepth(), {_x:i*20, _y:j*20}); } }