# sortOn on Arrays crashes

**URL:** <https://forum.kirupa.com/t/sorton-on-arrays-crashes/311357>\
**Category:** flash\
**Created:** [July 4, 2010, 2:12am UTC](https://forum.kirupa.com/t/sorton-on-arrays-crashes/311357 "2010-07-04T02:12:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![four4swords](https://avatars.discourse-cdn.com/v4/letter/f/87869e/32.png) [@four4swords](https://forum.kirupa.com/u/four4swords)\
**Post date:** [July 4, 2010, 2:12am UTC](https://forum.kirupa.com/t/sorton-on-arrays-crashes/311357/1 "2010-07-04T02:12:53Z")

</div>

Hi,

I’m trying to sort some arrays with the sortOn() function in Flash CS3… but it always seems to crash itself upon exporting!

Do you guys get this too? And is there a way to get around this?

```auto

var ms:Array = [];
ms[0] = [0,1];
ms[1] = [5,8];
ms[2] = [5,3];
ms[6] = [1,8];
ms[4] = [2,8];
ms[5] = [4,2];

ms.sortOn([1,0], Array.DESCENDING);

ms.reverse();
for(var i:int=0;i<ms.length;i++){
    trace(ms*);
}

```

That’s my code… Just paste that into the first frame of a new document and test movie…

Crashes my Flash CS3 everytime… So fustrating…
