Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Before we say farewell to Array, let's recap a few of its fantastic properties and make some quick observations on how ActionScript 3.0 arrays compare to similar data types in other languages. Arrays are possibly the most versatile tool in ActionScript.
Arrays are dynamically sized. You never have to do anything to allocate more memory for them or free memory they're not using.
Arrays are always mutable. You can always create, remove, update, and delete values from them.
Arrays support list operations like push() and pop(), and functional programming like filter() and map().
Arrays are mixed. You can put multiple types into an array, even if they're not the same type.
Arrays can be sparse, meaning that you can have a gap in the indices of an array. This can be really helpful or really dangerous. Use with caution.
var arr:Array = ["zero", "one", "two"]; arr[5] = "five"; trace(arr); //zero,one,two,,,five
Arrays can be associative, but you should probably leave that up to Objects, as mentioned earlier.