EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Static Statement

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
226 ActionScript language elements
Parameters
variableString:String - A string that names a variable to hold the value of the
expression parameter.
Example
In the following example, you assign a value to a variable. You are assigning the value of
"Jakob" to the name variable.
set("name", "Jakob");
trace(name);
The following code loops three times and creates three new variables, called caption0,
caption1, and caption2:
for (var i = 0; i < 3; i++) {
set("caption" + i, "this is caption " + i);
}
trace(caption0);
trace(caption1);
trace(caption2);
See also
var statement
static statement
class someClassName{
static var name;
static function name() {
// your statements here
}
}
Specifies that a variable or function is created only once per class rather than being created in
every object based on that class.
You can access a static class member without creating an instance of the class by using the
syntax
someClassName.name. If you do create an instance of the class, you can also access a
static member using the instance, but only through a non-static function that accesses the
static member.
You can use this keyword in class definitions only, not in interface definitions.
Availability: ActionScript 2.0; Flash Player 6
Parameters
name:String - The name of the variable or function that you want to specify as static.

Table of Contents

Related product manuals