/ Published in: ActionScript 3
Row Column Logic
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var nSutun :uint = 5; //Kaç sütun olsun var mKare :MovieClip; var nXspace :uint = 5; //x eksenine göre boşluk var nYspace :uint = 5; //y eksenine göre boşluk function createThumb():void { for (var i:uint = 0; i < nTotal; i++) { mKare = new Kare(); mKare.x = (i % nSutun) * (mKare.width + nXspace); mKare.y = Math.floor(i / nSutun) * (mKare.height + nYspace); addChild(mKare); } } createThumb();