Row Column Logic


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

Row Column Logic


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.