Mendelsohn, Michael 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?
Why is any order better than another. one,two,three is not the correct
alphabetic sort order.
How would you order
var myArray:Array = ["cat", "pig", "dog"];
Alphabetic, by average weight, by popularity???
If you want an associative array to have some sort of order that depends
on some interpretation of meaning, you will have to do that yourself.
What are you really trying to do? There is probably a simple solution.
Perhaps you do not really want and associative array at all?
Thanks,
- Michael M.
_______________________________________________
[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
_______________________________________________
[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