Friday, April 30, 2010

Flex Actionscript Goodness: A better for loop

Along with traiditional for loop for iterating, Actionscript also allows an easier way..
following example demostrates it

var arr:Array = ["mytest1", "mytest2", "mytest3"];
// Use a regular for in loop to access the properties in arr
for ( var i in arr ) {
trace( arr[i]);

Done!! Hurray!!