Wednesday, September 22, 2010

Reset Array in Flex

This is simple tip to reset the array in FLEX.

I am not sure why Array length setter method is public, may be because of this we have the hack.

var array:Array = [1,2,3,4];
trace(array.length); // 4
array.length = 0;
trace(array.length); // 0

No comments:

Post a Comment