How to create a lot of addChild on MovieClip and to cut off them by the border MovieClip?
I draw grid on MovieClip in the library
this.DrawGrid = function (){
for(var iY = 0 ; iY< this.rows; iY++ ){
for(var iX = 0 ; iX< this.cols; iX++ ){
var grid = new lib.RectCell();
grid.x = /*calc X*/
grid.y = /*calc Y*/
this.parent.addChild(grid );
}
// draw grid
this.newInstanceGrid.DrawSetka();
it works but how I can set a border for grid and auto hide grid out of MovieClip.height and MovieClip.width.
I want to cut off border like it

