static

Availability

Flash Player 6.

Usage

class someClassName{
  static var name;
  static function name() {
    // your statements here
  }
}

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

name The name of the variable or function that you want to specify as static.

Description

Keyword; specifies that a variable or function is created only once per class rather than being created in every object based on that class. For more information, see Instance and class members.

You can use this keyword in class definitions only, not in interface definitions.

See also

private, public