Adobe AFTER EFFECTS CS3 PROFESSIONAL User Manual page 558

Hide thumbs Also See for AFTER EFFECTS CS3 PROFESSIONAL:
Table of Contents

Advertisement

• Spaces between words are ignored, except within a string.
In JavaScript, a value stored in an object is called a property. However, After Effects uses the term property to refer to
layer attributes as defined in the Timeline panel. Consequently, for clarity, After Effects documentation refers to a
JavaScript property as a method when the property takes arguments, or an attribute when it does not.
The value of an expression is the value of the last statement evaluated.
Accessing attributes and methods
You use the expression language to access attributes and methods of layer properties. To access a value, use a chain
of object references separated by the period (
to chain effect properties, masks, or text animators), you can also use parentheses. For example, to link the Opacity
property in Layer A to the Gaussian Blur effect's Blurriness property in Layer B, type the following expression in the
expression field for Layer A's Opacity property:
thisComp.layer("Layer B").effect("Gaussian Blur")("Blurriness")
The default object for an expression is the property on which the expression is written, followed by the layer
containing the expression; therefore, you do not need to specify the property. For example, a wiggle expression
written on a layer's Position property can be either of the following:
wiggle(5, 10)
position.wiggle(5, 10)
You do need to include the layer and property when retrieving them from outside the layer and property on which
the expression is written. For example, an expression written on Layer B's Opacity property, linking it to Layer A's
Rotation property would look like this:
thisComp.layer("Layer A").rotation
To see more examples of how this works, use the pick whip to link one layer property to another, and look at the
expressions it creates.
Arrays and multidimensional properties
An Array is a type of object that stores an ordered set of numbers. An Array is represented as a list of numbers
separated by commas and surrounded by brackets, as in this example:
[10, 23]
You can assign an Array to a variable, making it easy to refer to Array values in other areas of the expression. For
example:
myArray = [10, 23]
The dimension of an Array is the number of elements in the Array. The dimension of
properties in After Effects have different dimensions depending on the number of value arguments they have. In the
expression language, properties' values are either single values (Numbers) or Arrays.
The following table provides examples of some properties and their dimensions:
) operator. To chain object references past the layer level (for example,
.
AFTER EFFECTS CS3
User Guide
is 2. Different
myArray
552

Advertisement

Table of Contents
loading

Table of Contents