You need to supply a custom sort function, like
//
function mySort(a,b){
if (a._xscale<b._xscale){
return -1
}else if(a._xscale>b._xscale){
return 1
}else{
return 0
}
}
//
then sort with it...
myArray._xscale.sort(mySort)
Or you could try a .sortOn() with _xscale, but i'm not sure offhand
if that works...
On Apr 14, 2006, at 11:48 PM, Stephen Ford wrote:
Hello All. Here is what I have and what I'm trying to do:
I have an array that contains 3 objects (which are all movie
clips), like so:
var myArray:Array = ["mcClip1", "mcClip2", "mcClip3"];
I want to sort this array according to the _xscale of these clips.
Does anyone know how I can do this.
This is my line of thought, which I know is wrong, but might give
more insight:
myArray._xscale.sort(Array.DESCENDING);
Please advise if you can.
Thanks,
Stephen.
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com