Create an Object, adds properties, and inspect its properties
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="initApp()">
<mx:Script>
private var obj:Object = new Object();
private function initApp():void {
obj.a = "A";
obj.b = "B";
obj.c = "C";
}
public function dumpObj():void {
for (var p:String in obj) {
ta1.text += p + ":" + obj[p] + "\n";
}
}
</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