Sorting mc's

hi there,

i’m trying to sort my movieclips like this

1 2 3 4 5    11 12 13 14   19 20 21 22
6 7 8 9 10   15 16 17 18   23 24 25 26

but i don’t know how to do this
this is the code that i have:

    allData = this.firstChild.childNodes;
        for (var i = 0 ; i<allData.length; i++) {
            var newBut:MovieClip = scroller.container.attachMovie("plaatMC", "plaat"+i, i);

            platen.push(allData*.firstChild.firstChild);
    
            newBut.slideCounter = 0;
            //newBut._visible = false;
            newBut.endY = -1;
            newBut.endX = i*(112);
            
            newBut._x = i%5*112;
            newBut._y = Math.floor(i/5)*112;
            trace(i);            
            // if (i> 19)
            //{
            //newBut._x = i*(112);    
            //newBut._x = i*(112);
            }

what i get now is:


1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20

Hope some one can help me :slight_smile: