Use mx.utils.ObjectUtil.toString() to print all dynamically added properties of an object
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="initApp()">
<mx:Script>
import mx.utils.ObjectUtil;
private var obj:Object = new Object();
private function initApp():void {
obj.a = "A";
obj.b = "B";
obj.c = "C";
}
public function dumpObj():void {
ta1.text = ObjectUtil.toString(obj);
}
</mx:Script>
<mx:TextArea id="ta1" width="400" height="500" />
<mx:Button label="Dump Object" click="dumpObj()" />
</mx:Application>
Related examples in the same category