I am not sure if there is a sort method for arrays such as Array.Sort(direction) if such a function does not exists then you can always write a quick bubble sort function.
function bubblesort(ArrayName){ changesmade = true; for(y = 0; y < ArrayName.Length; y++{ if(changesmade){ changesmade = false; for(x = 0; x < ArrayName.Length-1; x++){ if(ArrayName[x] < ArrayName[x+1]){ temp = ArrayName[x]; ArrayName[x] = ArrayName[x+1]; ArrayName[x+1] = temp; Changesmade = true; } } } } Return ArrayName; } If you want to sort in accending order or descending order as well the if statement just needs to have the less than sign changed to a greater than sign. There are ways of speeding this function up you can put in a variable that checks to see if you made any changes to the array with each pass If no changes were made then array is sorted. But I might not bother with this step for only 10 variables. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Corban Baxter Sent: Friday, July 06, 2007 8:50 AM To: Flashcoders mailing list Subject: [Flashcoders] least to greatest Hey all I have a list of 10 numbers that I need to push into and array from least to greatest fairly often. What would be the fastest way to get this accomplished? Or maybe just anyway to get this done would be a great help thanks. -- Corban Baxter http://www.projectx4.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 _______________________________________________ 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