Posted By

burakkirkil on 07/29/12


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

PawelGIX


Row Column Logic


 / Published in: ActionScript 3
 

Row Column Logic

  1. var nSutun :uint = 5; //Kaç sütun olsun
  2.  
  3. var mKare :MovieClip;
  4. var nXspace :uint = 5; //x eksenine göre boşluk
  5. var nYspace :uint = 5; //y eksenine göre boşluk
  6.  
  7. function createThumb():void
  8. {
  9. for (var i:uint = 0; i < nTotal; i++)
  10. {
  11. mKare = new Kare();
  12. mKare.x = (i % nSutun) * (mKare.width + nXspace);
  13. mKare.y = Math.floor(i / nSutun) * (mKare.height + nYspace);
  14. addChild(mKare);
  15. }
  16. }
  17.  
  18. createThumb();

Report this snippet  

You need to login to post a comment.