The actual type of your component is MyCustomBox. Its superclass is VBox. VBox's superclass is Box. Box's superclass is Container, etc. So you're looking for your immediate superclass.
Use the getQualifiedSuperclassName() function in the flash.utils package. It will give you a String like "mx.containers:VBox". (It think it puts a colon in there.) Gordon Smith Adobe Flex SDK Team From: [email protected] [mailto:[email protected]] On Behalf Of Ashish Verma Sent: Thursday, February 26, 2009 5:37 AM To: [email protected] Subject: Re: [flexcoders] How to find the actual type of a custom flex component? You can use "is" operator to compare that object with your desired set of classes using if - else if conditions Best, Ashish On Thu, Feb 26, 2009 at 3:30 PM, Gregor Kiddie <[email protected]<mailto:[email protected]>> wrote: I think describeType() gives the inheritance list. You could pick it out of that. It certainly gives the baseclass Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact [email protected]<mailto:[email protected]> ________________________________ From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of pmotzfeldt Sent: 26 February 2009 07:41 To: [email protected]<mailto:[email protected]> Subject: [flexcoders] How to find the actual type of a custom flex component? Hi, I am wondering if anybody knows how I can find the actual class type of a custom component? By that I mean I create a custom component that is a VBox, but I call it MyCustomBox, and whenever I call className on that it returns MyCustomBox, but I want to get the class VBox by any means. Appreciate any help, thanks!

