Grids in 2 lines of Code


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

This is a way to make grids in 2 lines of code


Copy this code and paste it in your HTML
  1. var cols:int = 2;
  2. height:int = 20;
  3. width:int = 40;
  4.  
  5. for (var i:int = 0;i<20;i++) {
  6. var clip:MovieClip = new MovieClip();
  7. clip.y = (Math.floor(counter/cols) * height);
  8. clip.x = (counter%cols * width);
  9. }

URL: http://www.ramsesz.be

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.