Understanding the ActionScript Language > About built-in objects > Accessing object properties |
![]() ![]() ![]() |
Accessing object properties
Use the dot (.
) operator to access the value of a property in an object. The name of the object goes on the left side of the dot, and the name of the property goes on the right side. For example, in the following statement, myObject
is the object and name
is the property:
myObject.name
To assign a value to a property in normal mode:
Use the set variable
action.
myObject.name = "Allen";
To change the value of a property:
Assign a new value as shown here:
myObject.name = "Homer";
You can also use the array access operator ([]
) to access the properties of an object. See Dot and array access operators.
![]() ![]() ![]() |