Skip to content

Instantly share code, notes, and snippets.

@RKAN
Created July 21, 2013 06:46
Show Gist options
  • Save RKAN/6047743 to your computer and use it in GitHub Desktop.
Save RKAN/6047743 to your computer and use it in GitHub Desktop.
Row Column Logic
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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment