Dot Operator - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

See also
/ division operator

. dot operator

object.property_or_method
instancename.variable
instancename.childinstance
instancename.childinstance.variable
Used to navigate movie clip hierarchies to access nested (child) movie clips, variables, or
properties. The dot operator is also used to test or set the properties of an object or top-level
class, execute a method of an object or top-level class, or create a data structure.
Availability: ActionScript 1.0; Flash Lite 1.0
Operands
- An instance of a class. The object can be an instance of any of the built-
object :
Object
in ActionScript classes or a custom class. This parameter is always to the left of the dot (.)
operator.
- The name of a property or method associated with an object. All the
property_or_method
valid methods and properties for the built-in classes are listed in the method and property
summary tables for that class. This parameter is always to the right of the dot (.) operator.
- The instance name of a movie clip.
— The instance
instancename :
MovieClip
variable
name to the left of the dot (
) operator can also represent a variable on the Timeline of the
.
movie clip.
- A movie clip instance that is a child of, or nested in, another
childinstance :
MovieClip
movie clip.
Returns
- The method, property or movie clip named on the right side of the dot.
Object
Example
The following example identifies the current value of the variable
in the movie
hairColor
clip
:
person_mc
person_mc.hairColor
The Flash 4 authoring environment did not support dot syntax, but Flash MX 2004 files
published for Flash Player 4 can use the dot operator. The preceding example is equivalent to
the following (deprecated) Flash 4 syntax:
/person_mc:hairColor
144
ActionScript language elements

Advertisement

Table of Contents
loading

Table of Contents