Example: Writing A Simple Expression - Adobe AFTER EFFECTS 7.0 Manual

Table of Contents

Advertisement

Add expression elements to the expression field by choosing them from the Expression Language menu.
Select a layer property and choose Animation > Add Expression.
1
2
Click the Expression Language menu icon
expression field at the location of the cursor:
t his C omp
To continue the expression, add a period (
3
an attribute from the Comp menu, such as layer(index) :
t hisC omp.layer(index)
Insert the specific layer information you want. For example, if you want to use the keyframe information from
4
Layer 1, change
to
index
1
t hisC omp.layer(1)
Next, add a period and choose an attribute or method from any of the Layer, Light, or Camera menus. For
5
example, if Layer 1 has Position keyframes that you want to use in your expression, choose position from the Layer
Properties menu, and so on.
t hisC omp.layer(1).p osit ion
See also
"About animation and layer properties" on page 188

Example: Writing a simple expression

Do the following to construct a simple expression that copies position values from one layer to another:
1
Create two solid layers: Solid 1 and Solid 2.
2
Animate the Position property values for Solid 1. (See "Using keyframes" on page 192.)
Select the Position property for Solid 2 and choose Animation > Add Expression. The following expression
3
appears by default:
transfor m.p osit ion
Type the following directly over
4
t his C omp
and choose Global > thisComp. The element appears in the
) to the end, click the Expression Language menu icon, and then choose
.
as follows:
transfor m.p osit ion
:
ADOBE AFTER EFFECTS 7.0
559
User Guide

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents