How about a for loop combined with a temp array?

function sortScores(dataArray:Array):Array{
        var tempArr:Array = new Array();
        for(var i=0; i<dataArray.length; i++){
                tempArr.push(dataArray[i].score);
        }
        tempArr.sort()
        return tempArr;
}

var mySortedScores:Array = sortScores(Track);
trace(mySortedScores);

Jason Merrill
Bank of America 
Learning Technology Solutions
 
 
 
 
 
 
>>-----Original Message-----
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Mendelsohn, Michael
>>Sent: Monday, June 19, 2006 2:07 PM
>>To: Flashcoders mailing list
>>Subject: [Flashcoders] Sort within an object
>>
>>Hi list...
>>
>>Is there any way to sort within an object:
>>
>>Track[1][score]
>>Track[2][score]
>>Track[3][score]
>>Track[4][score]
>>Track[5][score]
>>
>>All the tracks have different score numeric values.  What's the most
>>efficient way of getting them in order?  It seems sort and sortOn only
>>work on arrays.
>>
>>Thanks,
>>- Michael M.
>>
>>_______________________________________________
>>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

Reply via email to