<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="initApp();">
 <mx:Script>
  <![CDATA[
   import mx.utils.ObjectUtil;
   private var obj:Array = new Array();
   
   private function initApp():void{
    //Create the Object
    obj.push("1 won sa ma");
    obj.push("2 won sa ma");
    obj.push("3 won sa ma");        
   }
   
   public function dumpObj():void{
    trace("called");
    for(var p:String in obj){
     ta1.text+=p+":"+obj[p]+"\n";
    }
   }
   
  ]]>
 </mx:Script>
 <mx:TextArea id="ta1" width="400" height="200" text="zz"/>
 <mx:Button label="Dump Object" click="dumpObj();" x="299" y="208"/>
 
</mx:Application>

+ Recent posts