Skip to content

Instantly share code, notes, and snippets.

@amowu
Created November 6, 2012 10:42
Show Gist options
  • Save amowu/4023972 to your computer and use it in GitHub Desktop.
Save amowu/4023972 to your computer and use it in GitHub Desktop.
Looping over properties of a Class (property enumeration)
//Get an XML description of this class
//and return the variable types as XMLList with e4x
var varList:XMLList = flash.utils.describeType(VO)..variable;
for(var i:int; i < varList.length(); i++){
//Show the name and the value
trace(varList[i].@name+':'+ VO[varList[i].@name]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment