Finally got round to taking a look at doign some Z-Sorting in Flash 10, the old try to find a faster way then Array.sortOn( "z" , Array.NUMERIC ); method that everybodies coined the "king of speed" but is still a bit slow!
So.. here it is, one line, using Vector instead of Array, and twice as fast (on my machine anyways) - with the source of course.
important: turns it this runs slower if the z-val is outside of the range 0-1; a LOT slower, so don't use!

















spelling mistake mate "doign" must be the CO2!
Ha, you had me there for a second, wondering and staring my screen, since my benches had said something else about this.
It's about the testing data. For this test, the compare function works. But, if your values go beyond the range of 0-1, you'll find that Array wins hands down by a big length. Try and fill your values with -100 to 100, for instance. I'm not sure what's wrong here. The comparison function description in the as3 docs says it should be positive, 0 or negative. But the magnitude of that number in positive and negative direction greatly affects the speed. I guess it makes sense, since it's used to index the value, but it's odd this is the case now.
you're right! strange too.
2 bugs:
a - should be y.z - x.z for descending order
b - any z val outside of the range 0-1 makes it run like a dog
back to the drawing board!