Or you can use the "is" operator: if (event.currentTarget is CreditCardValidator) { ... }
But take care of the fact, that it will return true on compatible types (descendants), too. Attila =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= From: Tony Alves <[EMAIL PROTECTED]> To: Flex Coders <flexcoders@yahoogroups.com> Date: Sunday, September 2, 2007, 12:56:25 AM Subject: [flexcoders] Determine the class of an event currentTarget --====----====----====----====----====----====----====----====----====----===-- How would I determine the class of an events "currentTarget" ? I want to do something like: switch (event.currentTarget) { case CreditCardValidator: break; case StringValidator: break; } Does not work, but explains what I am looking for. Anyone? Tony =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=