actionscript 3 - How To Dynamically Access Object Property? -
i have stored name of property of object string. in php, if object named $object
, property variable named $key
, accessed $object->$key
. how can dynamically access properties in actionscript?
you can access this:
var obj = { property1: 'this property', property2: 'this property' } var key = 'property2'; obj[key]; // 'this property'
Comments
Post a Comment