I need to determine if one class descends (directly or indirectly) from another.
I can do
var testInstance : Object = new ClassA();
if (testInstance is ClassB)
...
but I hate creating an instance just to test ancestry. I hoped that if (ClassA is ClassB) would work, but it does not seem to.
AS help states
isPrototypeOf(theClass:Object):Boolean
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the
parameter.
I don't actually understand ActionScript prototypes (I think it might drive me insane), but I hope that Class objects have some way of tapping into their inheritance information.
Thanks