Posts Tagged field

Utility Function: getProperties

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 »

8 Comments

Class Bootup

Tags: , ,

Being allowed to declare and define member variables all at once introduces a question: in which order does the class boot up? Further, if the class has parent classes, how does this change things? Read on for the simple results.

Read the rest of this article »

2 Comments

Overriding Variables

Tags: , ,

AS3 makes some strange things possible. Even stranger, it seems to do this without any warning by its compiler: MXMLC. It seems as though one of these strange things is the ability to override the variables of your parent classes.

Read the rest of this article »

3 Comments