Arrange grids when columns are known


/ Published in: ActionScript 3
Save to your folder(s)

Arrange objects in grid position when number of columns is known.


Copy this code and paste it in your HTML
  1. for(var i:int = 0; i<10; i++)
  2. {
  3. obj.x = _width *(i%_numOfColumns);
  4. obj.y = _height*Math.floor(i/_numOfColumns);
  5. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.