Here is a tip containing a quicker way to sort an ArrayCollection in ActionScript by using the underlying Array sortOn method. By quick I mean less code - I make no statement about performance.
Normally to sort an ArrayCollection you would need to create instances of both the Sort and SortField classes to arrive at something like this (untested code to give you an idea):
2var sortField:SortField = new SortField();
3sortField.name = "myFieldName";
4sortField.numeric = true;
5sortField.descending = true;
6
7myCollection.sort = sort;
8myCollection.refresh();
However since the source property of the ArrayCollection class points to the Array that acts as the source of the Arraycollection's data you can mess with it if you like (it's a bit naughty as you are not meant to do this and your mileage may vary).
So therefore to sort the above example 'myCollection' numerically by 'myFieldName' you could to this:
2myCollection.refresh();
I'm sure someone will tell me off for this but here you go. This worked for me for my purposes and it seems a lot simpler. And I like simple things.

#1 by Devin on 11/7/11 - 7:18 PM
I believe the idea is that an ArrayCollection can be sorted independantly of the backing array... and so you shouldn't assume the sort order of the backing array will neccessarily be how the ArrayCollection is sorted.
However, it looks like (due to your experiment) that if the ArrayCollection does not have a sort applied on itself, that it falls back to the sort on the backing array. Good to know!