Organize Thumbs in Columns + Rows?

how would you make these clips organize in columns and rows?

for (var b=0; b<gallery.childNodes.length; b++) {
item = _root.nav.attachMovie("itemClip", "itemClip" + b, b);
item._x = 10+24*b;
item._y = 20.0;
item.mytitle=gallery.childNodes**.attributes.title;
item.imagepath=b;

orginal source file: not 100% but pretty sure this is some of Scotty’s work

thanks in advance for any help
sky