Using Objects in ActionScript > About overriding inherited methods

 

About overriding inherited methods

When you create a class that inherits properties and methods from another class, the class that inherits the properties and methods is the subclass, and the class that the properties and methods are inherited from is the superclass.

Sometimes you may need to override an inherited method. You can do this by defining a method with the same name in the subclass prototype object.

You can build on the behavior of the method you are overriding (rather than overriding it completely), using the super operator.

For information on using the super operator to build on a superclass method, see super in the ActionScript Dictionary.