super Operator

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
super "Operator" Flash 6

invoke an object's superclass constructor, or invoke a superclass's implementation of an overridden method
super(arg1, arg2,...argn); super.methodName(arg1, arg2,...argn);

Operands

arg1, ...argn

A list of arguments passed to the superclass constructor function.

methodName

The superclass's implementation of an overridden method to be invoked.

Description

The super "operator," added in Flash 6, serves two distinct object-oriented programming purposes:

  • It can invoke an object's superclass constructor.

  • It can invoke a superclass's implementation of an overridden method.

See "The super `Operator'" in Chapter 5 for many more details.

Usage

Technically, super is not a real operator in ActionScript, which is why it is presented here as the super "operator."

See Also

instanceof, new, Object.hasOwnProperty( ); "The super `Operator'," in Chapter 5; "Making a superclass," "Accessing overridden methods," and "A custom setSuperClass( ) function,"in Chapter 12.



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net