title: AS3 iterating through class variables
body: <p>how can i iterate through all the variables of a class instance?
  it appears to work for regular objects...</p>
  
  <p>Edited: This will do it =)</p>
  
  <pre><code>var test:anyClass=new anyClass();
  var someObject:Object={val1:"object string",val2:111,val3:new Date()};
  var xmlList:XMLList=describeType(anyClass)..variable;
  for each(var key:* in someObject)
      trace(String(key));
  for each(var item:XML in xmlList)
      trace(String(test[item.@name]));
  </code></pre>
  
  <p>output:
  object string
  111
  Thu Nov 8 11:19:27 GMT-0700 2012
  class string
  222
  Thu Nov 8 11:19:27 GMT-0700 2012</p>
  
  <pre><code>public class anyClass
  {
      public var val1:String="class string";
      public var val2:int=222;
      public var val3:Date=new Date();
  }
  </code></pre>