i have many objects of the same custom class, and another many objects of another custom class. i would like to create a switch statement to determine from which of the classes the object belongs. the following code doesn't compile, so i'm not sure if this is possible. is the only alternative to use if statements?
function mouseClickEventHandler(evt:MouseEvent):void
{
switch (evt.currentTarget)
{
case (is customClassA): trace("is instance of customClassA"); break
case (is customClassB): trace("is instance of customClassB");
}
}