The preferred way is to use the 'is' operator, which is new in AS3:

 

    trace(str is String); // output is "true"

 

- Gordon

 


From: [email protected] [mailto:[email protected]] On Behalf Of Harish Sivaramakrishnan
Sent: Monday, September 18, 2006 6:06 AM
To: [email protected]
Subject: Re: [flexcoders] Object of a specified type

 

use typeof to find the type of an object.

ex:

var str:String

trace(typeof(str) : prints "string"

Hope this helps
Harish

On 9/18/06, Daniel <[EMAIL PROTECTED]com> wrote:

How can I konw if an object is an instance of a specified type, for
example String.

Thx!

 

__._,_.___

--
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
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to