"Z-order" is a term of art to refer to depth -- the 3rd dimension (Z -- not X or Y). Using it to describe the shape of the letter is probably unwise, because it will promote confusion.
Try the solution I just posted in this thread: Re: Working around the frame selection order issue in CS 4.
Thank you, this method is new to me.
Is the speed this way sorting faster than loop if many objects selected?
All we're doing is giving it a comparison function so it knows which element comes first, for any given pair of elements.
Your loop...looks to me like it is a variant on bubble sort but that it probably does not work correctly? It is hard to compare known sorting algorithms to made-up ones...you should almost always use an existing algorithm, rather than one of your own. It is too easy to make mistakes.
Thank you for your explanation.