A Map Interface For Flash

I know you can accomplish the same things with associative arrays and objects in Flash, but I’m used to Map-like interfaces, so before I could get any real work done, I had to write SimpleMap.as. As it’s name implies, it’s a simple implementation which gives you put, get, remove, size, keys, values and toString functions. I prefer it over using objects and associative arrays, and it makes a good base class for building specific kinds of Maps. I haven’t written any others yet, but I can envision a SortableMap, ExpiringMap (where entries are automatically removed after a specified amount of time), ArrayMap (which automatically creates arrays for entries with duplicate keys), etc.

Be warned: this code is my own invention, and has not been QAed, so put it through its paces before incorporating it into your own project.