in ActionScript 3.0, there are a few ways to check a class’s extension. for example, if i want to know of a custom class extends Sprite i could use the is operator:
trace(MyClass is Sprite);
or i could use flash.utils.getQualifiedSuperclassName:
trace(getQualifiedSuperclassName(MyClass));
i would like to accept a class as an argument and check to see if the passed class implements an certain interface. is there an equally simple or common way to check if my custom class adheres to an interface? perhaps something like:
trace(MyClass implements IMyInterface);
why not just
trace(MyClass is IMyInterface);?