Version 1, last updated by Kirill Mourzenko at September 04, 2008 18:49 UTC
Unique Object Ids
A lot of the times while writing AS code I found that it would be really great if I could identify objects from one another, kind of like using a memory address of an object in C++. So I had HATObject decorate the Object prototype with a function called hatId to do just that. A unique id for an object is only created the first time the function is called on it, which is really the only time the id needs to be created for it. Because the function is part of the general Object you can call this function on any object not just HATObjects. But you might need to type-cast the object first like so otherwise you'll get a compiler error:
Object( myObject ).hatId();