Operators > . (dot operator)

. (dot operator)

Syntax

object.property_or_method
instancename.variable
instancename.childinstance.variable

Arguments

object An instance of an object. Some objects require that instances be created using the constructor for that object. The object can be any of the predefined ActionScript objects or a custom object. This argument is always to the left of the dot (.) operator.

property_or_method The name of a property or method associated with an object. All of the valid method and properties for the predefined objects are listed in the Method and Property summary tables for that object. This argument is always to the right of the dot (.) operator.

instancename The name of a movie clip instance.

childinstance An movie clip instance that is a child of the main movie clip.

variable A variable in a movie clip.

Description

Operator; used to navigate movie clip hierarchies in order to access nested child movie clips, variables, or properties. The dot operator is also used to test or set the properties of an object, execute a method of an object, or create a data structure.

Player

Flash 4 or later.

See also

[] (array access operator)

Example

This statement identifies the current value of the variable hairColor by the movie clip person:

person.hairColor

This is equivalent to the following Flash 4 syntax:

/person:hairColor

Example

The following code illustrates how the dot operator can be used to create a structure of an array:

account.name = "Gary Smith";
account.address = "123 Main St ";
account.city = "Any Town";
account.state = "CA";
account.zip = "12345";