extends 381
Example
The following example uses eval() to determine the value of the expression "piece" + x.
Because the result is a variable name,
piece3, eval() returns the value of the variable and assigns
it to
y:
piece3 = "dangerous";
x = 3;
y = eval("piece" + x);
trace(y);
// Output: dangerous
See also
Array class
extends
Availability
Flash Player 6.
Usage
class className extends otherClassName {}
interface interfaceName extends otherInterfaceName {}
Note: To use this keyword, you must specify ActionScript 2.0 and Flash Player 6 or later in the Flash
tab of your FLA file’s Publish Settings dialog box. This keyword is supported only when used in
external script files, not in scripts written in the Actions panel.
Parameters
className
The name of the class you are defining.
otherClassName The name of the class on which className is based.
interfaceName The name of the interface you are defining.
otherInterfaceName The name of the interface on which interfaceName is based.
Description
Keyword; defines a class or interface that is a subclass of another class or interface; the latter is the
superclass. The subclass inherits all the methods, properties, functions, and so on that are defined
in the superclass.
For more information, see “Creating subclasses” on page 162.