ArrayCollection is just a wrapper for an array and is only available in Flex.
In AS3, you really have 3 main types of hash tables: Array, Object, and Dictionary. You choose which one to use based on the type of key you want to use: an integer, a string, or an object reference. Arrays converts any key to int, Object converts any key to a string. The dictionary works like an Object for string keys (and converts primitives to string), but what it really does good uses object references as keys.
You want to use a single int as a unique key, use an array. If you want to use a single line as a unique key, use an object. If you want to use object references as a unique key, use a dictionary.
In your case, you should probably use the object and your own toString() method in your key class. This is because you want to use a composition of primitive values ββ(NOT reference) as a unique key. It is not possible to do this initially, so you have to crush the values ββtogether as a single line. Objects are the best (fastest) hash table for string keys, so this is the collection you should use.
Example:
class User { private var m_iUID:int; private var m_blnIsCurrent:Boolean; public var m_strNearID:String; public function User(UID:int, IsCurrent:Boolean) { m_iUID = UID; m_blnIsCurrent = IsCurrent; }
source share