Extends Statement - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Parameters
condition:Boolean
Example
The following example uses
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
interface includes all the original interface's method declarations.
Availability: ActionScript 2.0; Flash Lite 2.0
Parameters
- The name of the class you are defining.
className:String
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.
- An expression that evaluates to
statements to compare
else if
extends
or
.
true
false
score_txt
keyword. An interface that extends another
to a specified value:
Statements
193

Advertisement

Table of Contents
loading

Table of Contents