The “is” keyword is probably good enough for your purposes, but if you need more information, e.g. the name of the class, it’s superclass, interfaces it implements, etc. you can use describeType() to get an XML document with all that information.

 


From: [email protected] [mailto:[email protected]] On Behalf Of Claus Wahlers
Sent: Thursday, August 10, 2006 9:54 AM
To: [email protected]
Subject: Re: [flexcoders] how do I get the "type" or "class" of an object in AS3

 

hank williams wrote:

> I have an object that is either a TextArea or a TextInput.
> I want to find out which one it is. How do I do that?

if(o is TextArea) { .. }

Cheers,
Claus.

__._,_.___

--
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