ActionScript 3 Language Specification |
|||
| ActionScript 3.0 Language Specification > 14 Expressions > 14.9 Super expression | |||
SuperExpression limits the binding of a reference to a property of the base class of the current method. The value of the operand must be an instance of the current class. If Arguments is specified, its value is used as the base object of the limited reference. If no Arguments is specified, the value of this is used as the base object.
|
SuperExpression |
|
|
|
|
|
|
|
SuperExpression may be used before a PropertyOperator in either a FullPostfixExpression or a FullNewSubexpression.
super.f(a,b,c) super(o).f(a,b,c)
SuperExpression : super
SuperExpression : super Arguments
SuperExpression : super
SuperExpression : super Arguments
ActionScript 2.0 supports only the first form of SuperExpression.
super.f(a,b,c)
This is equivalent to the following ActionScript 2.0 code:
this.constructor.prototype.__proto__.f.apply(this,arguments);
This differs from ActionScript 3.0 depending on the value of this, and whether the value of constructor, prototoype or __proto__ has been modified.
The second form of SuperExpression is included for future compatibility and completeness.
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/specs/actionscript/3/as3_specification129.html