# Sorting mc's

**URL:** <https://forum.kirupa.com/t/sorting-mcs/273815>\
**Category:** Uncategorized\
**Created:** [October 21, 2008, 9:55am UTC](https://forum.kirupa.com/t/sorting-mcs/273815 "2008-10-21T09:55:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mitchelvase](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@mitchelvase](https://forum.kirupa.com/u/mitchelvase)\
**Post date:** [October 21, 2008, 9:55am UTC](https://forum.kirupa.com/t/sorting-mcs/273815/1 "2008-10-21T09:55:45Z")

</div>

hi there,

i’m trying to sort my movieclips like this

```auto
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:

```auto
    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:

```auto

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 🙂
