# Array with mc's x position

**URL:** <https://forum.kirupa.com/t/array-with-mcs-x-position/242727>\
**Category:** Uncategorized\
**Created:** [October 29, 2007, 9:02pm UTC](https://forum.kirupa.com/t/array-with-mcs-x-position/242727 "2007-10-29T21:02:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![outdoors](https://avatars.discourse-cdn.com/v4/letter/o/e56c9b/32.png) [@outdoors](https://forum.kirupa.com/u/outdoors)\
**Post date:** [October 29, 2007, 9:02pm UTC](https://forum.kirupa.com/t/array-with-mcs-x-position/242727/1 "2007-10-29T21:02:34Z")

</div>

Hi,

This might sound odd, but i have a bunch of mc’s on stage and i need to get an array of all mc’s sorted by their x or y position. That way i can animate them in different ways by rearranging the array. (IE top down etc.)

So, a bunch of movieclips at random depths, get array with all mc’s, arrange by x or y.

Any ideas?

I was thinking numChildren and a loop to get all the mc’s. But im lost when it comes to the filtering/arrangeing
