# Setting Position and row/colum count

**URL:** <https://forum.kirupa.com/t/setting-position-and-row-colum-count/238142>\
**Category:** flash\
**Created:** [September 7, 2007, 3:49pm UTC](https://forum.kirupa.com/t/setting-position-and-row-colum-count/238142 "2007-09-07T15:49:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Multi\_Task](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Multi\_Task](https://forum.kirupa.com/u/Multi_Task)\
**Post date:** [September 7, 2007, 3:49pm UTC](https://forum.kirupa.com/t/setting-position-and-row-colum-count/238142/1 "2007-09-07T15:49:27Z")

</div>

I have logos coming from an xml doc which there are about 18 of. I am trying to get 6 to load up at a time with 3 colums and 2 rows ( 3 across top and 2 sets ). And I cant figure it out. Along with that I am trying to get these logos to be centered in the middle of my swf. Here is how I am going about it which loads them irraticaly across.

```auto

var numOfItems:Number;
var games:MovieClip = this;
var numOfRows = 2;
var numOfColum = 3;
var showMax = 6;
var spacing = 20;
var centerX:Number = Stage.width / 2;
var centerY:Number = Stage.height / 2;
////GetEm
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
 var nodes = this.firstChild.childNodes;
 numOfItems = nodes.length;
 for(var i=0;i<numOfItems;i++)
 {
  var t = games.attachMovie("iconMC","iconMC"+i,i+1);
  t.placeEm = i * (numOfItems/numOfRows);
  t.onEnterFrame = placeEm;
  t.logo.logoContainer.loadMovie(nodes*.attributes.logo);
  t.t1.tText.text = nodes*.attributes.title;
  t.t2.cText.text = nodes*.attributes.category;
  t.link = nodes*.attributes.link;
  t.onRollOver = over;
  t.onRollOut = out;
  t.onRelease = released;
 }
}
xml.load("icons.xml");
/////placeEm
t._x = centerX;
t._y = centerY; ////////////Here it should set them however it is place them in upper left.

```

Any ideas?
