You can use the function flash.utils.describeType(instance) to find out the public property and method names in an instance.  It will also tell you the name of the instance's class. If the class name is all you need, flash.utils.getQualifiedClassName() is much faster than describeType().

 

describeType returns an XML instance, so you should learn how to use the E4X features of ActionScript 3 to extract the property names.

 

Once you know a property name, you can then use instance[propName] to get the value of a property in the instance.

 

- Gordon

 


From: [email protected] [mailto:[email protected]] On Behalf Of santharao246
Sent: Friday, August 04, 2006 12:20 AM
To: [email protected]
Subject: [flexcoders] How to get the property names from Actionscript object like java reflection

 

Hi,

I tried to construct Tree with Actionscript object.Root should be name
of the object and childrens should be properties and their values of
that object.That's why I tried to get the property names and class
name of that given object in Flex20.

Please help me.

Thanks,

Santa Rao

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to