Tags: , , , , , , , , ,

Quite often I have wanted to iterate over the public fields (and getters) of an arbitrary object. Sometimes this is for debugging purposes so I can print out the state of an object, particularly one that has all public fields like a C/C++ structure. Sadly, this is not possibly (with most objects) using the for-in and for-each loops we’ve come to know and love. So I made a utility function that I’m sharing with you all today. UPDATE: getProperties now supports MovieClip derivatives such as library symbols from an FLA

Read the rest of this article »