for..in usually loops thru the elements in 'reverse' order; though, the for..in loop's output is supposed to be in a unpredictable <http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001250.html>order. If you want the elements to be in a predictable order, you will have to loop thru the indices of the array.
If you can push them into the array in reverse order wont be a prob, try tat. But as I already said, for..in loop is supposed to return elements in an unpredictable order ;o) ~Arul Prasad. On 6/20/06, Mendelsohn, Michael <[EMAIL PROTECTED]> wrote:
Hi list... >From the help on "for...in": You can also iterate through the elements of an array: var myArray:Array = ["one", "two", "three"]; for (var i:String in myArray) { trace(myArray[i]); } This code outputs the following in the Output panel: three two One Why is the data output in reverse order and is there any way of ordering it one,two,three? 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