set

Availability

Flash Player 6.

Usage

function set property(varName) {
  // 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

property Word you want to use to refer to the property that set will access; this value must be the same as the value used in the corresponding get command.

varName The local variable that sets the value you're assigning.

Returns

Nothing.

Description

Keyword; permits implicit "setting" of properties associated with objects based on classes you have defined in external class files. Using implicit set methods lets you access properties of objects without accessing them directly. Implicit get/set methods are syntactic shorthand for the Object.addProperty() method in ActionScript 1.

For more information, see Implicit get/set methods.

See also

get, Object.addProperty()