User Guide
Statements 193
Parameters
condition:Boolean - An expression that evaluates to true or false.
Example
The following example uses else if statements to compare score_txtto a specified value:
if (score_txt.text>90) { trace("A"); } else if (score_txt.text>75) {
trace("B"); } else if (score_txt.text>60) { trace("C"); } else {
trace("F"); }
See also
if statement
extends statement
Usage 1:
class className extends otherClassName {}
Usage 2:
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.
Defines a class that is a subclass of another class; the latter is the superclass. The subclass
inherits all the methods, properties, functions, and so on that are defined in the superclass.
Interfaces can also be extended using the
extends keyword. An interface that extends another
interface includes all the original interface's method declarations.
Availability: ActionScript 2.0; Flash Lite 2.0
Parameters
className:String - The name of the class you are defining.
Example
In the following example, the Car class extends the Vehicle class so that all its methods,
properties, and functions are inherited. If your script instantiates a Car object, methods from
both the Car class and the Vehicle class can be used.