Just as a fun thing to do on the side, I'd try researching priority queues, which were designed for exactly this sort of problem.
They get used a lot in pathfinding algorithms for games, which probably makes them doubly relevant. --- [EMAIL PROTECTED] wrote: > > > Hello, > > Can anybody tell me how to sort the following array > based upon the second > value > within each array item > > myArray:Array = [ > [20,40],[20,10],[30,15],[30,35],[40,100],[1000,1]]; > > this should be something like > > [[1000,1], [20,10], ..... > > Faster the better cos its for a game and gets called > a lot of times. > > > regards > > _______________________________________________ > [email protected] > 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 > ____________________________________________________________________________________ Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html _______________________________________________ [email protected] 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

