Skip to main content
Inspiring
December 28, 2016
Answered

How to create a lot of addChild on MovieClip and to cut off them by the border MovieClip?

  • December 28, 2016
  • 1 reply
  • 391 views

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

This topic has been closed for replies.

1 reply

Legend
December 28, 2016

Is there some reason a mask wouldn't work?

Inspiring
December 29, 2016

I don't know what the mask you mean.

ClayUUIDCorrect answer
Legend
December 29, 2016