214
ActionScript language elements
Create a FLA or AS document in the same directory, and enter the following ActionScript in
Frame 1 of the Timeline:
trace(Users.instances);
var user1:Users = new Users();
trace(Users.instances);
var user2:Users = new Users();
trace(Users.instances);
See also
private statement
super statement
super.
method
([
arg1, ..., argN
])
super([
arg1, ..., argN
])
the first syntax style may be used within the body of an object method to invoke the
superclass version of a method, and can optionally pass parameters
(arg1 ... argN)
to the
superclass method. This is useful for creating subclass methods that add additional behavior
to superclass methods, but also invoke the superclass methods to perform their original
behavior.
The second syntax style may be used within the body of a constructor function to invoke the
superclass version of the constructor function and may optionally pass it parameters. This is
useful for creating a subclass that performs additional initialization, but also invokes the
superclass constructor to perform superclass initialization.
Availability:
ActionScript 1.0; Flash Lite 2.0
Returns
Both forms invoke a function. The function may return any value.
Parameters
method
:
Function
- The method to invoke in the superclass.
argN
- Optional parameters that are passed to the superclass version of the method (syntax 1)
or to the constructor function of the superclass (syntax 2).
Summary of Contents for FLASHLITE2 ACTIONSCRIPT-LANGUAGE
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...