# Tile thumbs from XML

**URL:** <https://forum.kirupa.com/t/tile-thumbs-from-xml/201303>\
**Category:** Uncategorized\
**Created:** [September 20, 2006, 9:23am UTC](https://forum.kirupa.com/t/tile-thumbs-from-xml/201303 "2006-09-20T09:23:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tobijas20](https://avatars.discourse-cdn.com/v4/letter/t/74df32/32.png) [@tobijas20](https://forum.kirupa.com/u/tobijas20)\
**Post date:** [September 20, 2006, 9:23am UTC](https://forum.kirupa.com/t/tile-thumbs-from-xml/201303/1 "2006-09-20T09:23:12Z")

</div>

I’m loading some text data from XML (short numbers) and I parse this data in thumbs with text field. Now I want to tile them max 400px in width. After that, they must start to tile in second row at x=0 and after 400px \_width they strat with third row…  
How to make this?  
This is the part of the code:

```auto
 
function loadData(success) {
 if (success) {
  someText = new Array();
  nodes = new Array();
  nodes = this.firstChild.childNodes;
  total = nodes.length;
  for (var i = 0; i<total; i++) {
   someText.push(nodes*.attributes.description);
   holder.btn.duplicateMovieClip("btn"+i, i);
   holder["btn"+i].tekst.text = someText*;
   holder["btn"+i]._x = holder["btn"+(i-1)]._x + (holder["btn"+(i-1)].tekst.textWidth)+6;
   if(holder["btn"+i]._x >= 400){
    holder["btn"+i]._y += 20;
   }
  }
 }
 delete nodes;
 delete data_xml;
}

```
