使用ObjectUtil来遍历flex as Object对象的所有属性:
var flexObj:Object = (要查询的object);
var objInfo:Object = ObjectUtil.getClassInfo(flexObj);
var fieldName:Array = objInfo["properties"] as Array;
var result:String = "";
for each(var q:QName in fieldName){
//q.localName 属性名称,value对应的值
var value:String = flexObj[q.localName] as String;
result += q+":"+value+"\n";
}
Alert.show(result);