Flex Object

setter:
var obj:Object = new Object();
obj.name="test";

getter:
var name:String = obj[name];

Why can't we just call obj.name to get the value? You could only if you could directly use the property name onto the object. You could not do like the following:

var key:String = "name";
var nameValue=obj.key; //this will not work
var nameValue2=obj.name; //this will work

The only way you could do is through []

var nameValue3=obj[key]; //this will work, and recommended

We could actually take property_name == ["property_name"].

Conversion between Java object and Flex object:

Objects are serialized using Java bean introspection rules and also include public fields. Fields that are static, transient, or nonpublic, as well as bean properties that are nonpublic or static, are excluded.

So only public-non-static fields will be transferred to Flex object.