Listing object properties / names

If you need to get the property names from an object:

var object:Object = {name:"lawrence", age:"26"};

for( var o : * in object){
    trace( o + " = " + object[o] );
}

source:
http://stackoverflow.com/questions/372317/how-can-i-get-list-of-properties-in-an-object-in-actionscript

Tech Reference:

Leave a Reply

Your email address will not be published. Required fields are marked *

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑