Adobe AFTER EFFECTS CS3 PROFESSIONAL User Manual page 559

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

Advertisement

Dimension
Property
1
Rotation ˚
Opacity %
2
Scale [x=width, y=height]
Position [x, y]
Anchor Point [x, y]
3
Scale [width, height, depth]
3D Position [x, y, z]
3D Anchor Point [x, y, z]
4
Color [red, green, blue, alpha]
You can access the individual elements of an Array by using brackets and an index number to indicate which element
you want. The elements in an Array are indexed starting from 0. Using the previous example,
is
.
myArray[1]
23
The following two expressions are equivalent:
[myArray[0], 5]
[10, 5]
The Position property arrays are indexed as follows:
is the x coordinate of position.
position[0]
is the y coordinate of position.
position[1]
is the z coordinate of position.
position[2]
Colors are represented as four-dimensional arrays [red, green, blue, alpha]. In projects with a color depth of 8 or 16
bpc, each value in a color array ranges from 0 (black) to 1 (white). For example, red can range from 0 (no color) to 1
(red). So, [0,0,0,0] is black and transparent, and [1,1,1,1] is white and completely opaque. In projects with a color
depth of 32 bpc, values under 0 and over 1 are allowed.
If you use an index that is greater than the index of the highest-dimension component in an Array, After Effects
returns an error. For example,
Many of the properties and methods in the After Effects expression language take Array objects as arguments or
return them as values. For example,
dimensional depending on whether your layer is 2D or 3D.
If you want to write an expression that keeps the y value of an object's animation but fixes the x value at 9, you would
use the following:
y = position[1];
[9,y]
The following is even more succinct:
[9, position[1]]
This is an important point, so let's look at one more example. If you want to combine the x position value from Layer
A with the y position value from Layer B, you would use the following:
causes an error, but
myArray[2]
thisLayer.position
returns the z coordinate of Position.
position[2]
is an Array that is either two-dimensional or three-
AFTER EFFECTS CS3
User Guide
is
and
myArray[0]
10
553

Advertisement

Table of Contents
loading

Table of Contents