# New line for loaded XML thumbnails

**URL:** https://forum.kirupa.com/t/new-line-for-loaded-xml-thumbnails/90266
**Category:** Uncategorized
**Created:** [May 16, 2005, 2:32pm UTC](https://forum.kirupa.com/t/new-line-for-loaded-xml-thumbnails/90266 "2005-05-16T14:32:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rai\_kane3](https://avatars.discourse-cdn.com/v4/letter/r/e47774/32.png) [@rai\_kane3](https://forum.kirupa.com/u/rai_kane3)
#### Post date: [May 16, 2005, 2:32pm UTC](https://forum.kirupa.com/t/new-line-for-loaded-xml-thumbnails/90266/1 "2005-05-16T14:32:30Z")

</div>

I have created a gallery with thumbnails (using various tutorials) howver the thumbnails all load on one line… I would like to able to brake up the thumbnails so that after say 4 tbm load the next 4 will go below I have tried various methods. Here is my script

images = new Array ();  
xml\_file = (“Gallery/Range/images.xml”);  
//xml\_file = “images.xml”;  
xmlload = new XML ();  
xmlload.ignoreWhite = true;  
xmlload.onLoad = function (ok) {  
if (ok) {  
count = this.firstChild.childNodes.length;  
for (var i = 0; i \< count; i++) {  
curNode = this.firstChild.childNodes\*;  
images\* = {caption:curNode.childNodes[0].firstChild.nodeValue, path:curNode.childNodes[1].firstChild.nodeValue};  
}  
boot ();  
} else {  
trace ("Could not load " + xml\_file + “.”);  
}  
};  
xmlload.load (xml\_file);  
// ------------------------------------------------------------  
spacing = 5;  
boot = function () {  
for (var i = 0; i \< images.length; i++) {  
mc = container.attachMovie (“thumbMC”, “thumb” + i, i);  
mc.\_x = i \* (95 + spacing);  
mc.path = “Gallery/Range/thumbs/” + images\*.path + “.jpg”;  
mc.link = “Gallery/Range/images/” + images\*.path + “.jpg”;  
mc.caption = images\*.caption;  
}  
this.\_parent.picture.\_alpha = 0;  
this.\_parent.caption.\_alpha = 0;  
this.\_parent.picture.loadMovie (“images/” + images[0].path + “.jpg”);  
this.\_parent.caption.txt = images[0].caption;  
setRollOver ();  
};

I have tried…

for \<var i = 0; i\<4; i++)  
for \<var j = 0; j\<4; i++){  
mc = container.attachMovie (“thumbMC”, “thumb” + i, i);  
mc.\_x = gridx_i (95 + spacing);  
mc.\_y = gridy_j (95 + spacing);

This didn’t work can anyone help me
