private

Availability

Flash Player 6.

Usage

class someClassName{
  private var name;
  private 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 private.

Description

Keyword; specifies that a variable or function is available only to the class that declares or defines it, or to subclasses of that class. By default, a variable or function is available to any class that calls it. Use this keyword if you want to restrict access to a variable or function. For more information, see Controlling member access.

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

See also

public, static