Adobe 65008009 - After Effects CS4 Using Manual page 656

User guide
Hide thumbs Also See for 65008009 - After Effects CS4:
Table of Contents

Advertisement

Last updated 12/21/2009
Edit an expression manually
Click in the expression field to enter text-editing mode.
1
Note: When you enter text-editing mode, the entire expression is selected. To add to the expression, click within the
expression to place the insertion point; otherwise, you will replace the entire expression.
Type and edit text in the expression field, optionally using the Expression Language menu.
2
To see more of a multiline expression, drag the bottom or top of the expression field to resize it.
3
To exit text-editing mode and activate the expression, do one of the following:
• Press Enter on the numeric keypad.
• Click outside the expression field.
Example: Use the expression language reference to write an expression
Follow along with this example to learn how to use the After Effects expression language reference to write expressions.
The expression created in this example links the Position property of Solid 2 to the Position property of Solid 1, with
the movement of Solid 2 offset by 2 seconds from the movement of Solid 1.
1
Create two solid layers: Solid 1 and Solid 2.
Animate the Position property values for Solid 1 using keyframes. (See
2
expressions" on page 210.)
Select the Position property for Solid 2 and choose Animation > Add Expression or Alt-click (Windows) or
3
Option-click the stopwatch
transform.position
Type the following directly over
4
thisComp
The element
5
thisComp
determine what can follow
objects, attributes, and methods (expression
Note that
returns a Comp object. Next, look at
thisComp
on page 667 to see which attributes and methods you can use with a Comp object. One option is
The index, or number, inside the parentheses specifies the layer that you want to use. For this example, we assume
that Solid 1 is the first layer in your composition. To retrieve values from the first layer in the active composition,
type
at the end of the expression, to get the following:
.layer(1)
thisComp.layer(1)
Again, look at the expression elements reference to see that
6
General attributes and methods (expression
example, if you want to get the values of the Position property for the layer, type
expression to get the following:
thisComp.layer(1).position
From
"Layer General attributes and methods (expression
7
attribute returns a property. Look up
notice that you can add a time factor to the expression. To add a specific time, such as current time plus 2 seconds,
type
.valueAtTime(time+2)
button for the property. The following expression appears by default:
transform.position
is a global attribute whose value is a Comp object representing the current composition. To
in your expression, look up the return value for
thisComp
reference)" on page 660.
reference)" on page 669, and find the element you want to use. For
"Property attributes and methods (expression
at the end of the expression to get the following:
"About animation, keyframes, and
:
"Comp attributes and methods (expression
returns a Layer object. Look at
layer(index)
.position
reference)" on page 669, you can see that the
USING AFTER EFFECTS CS4
Expressions
under
"Global
thisComp
reference)"
layer(index)
"Layer
at the end of the
position
reference)" on page 677 and
650
.

Advertisement

Table of Contents
loading

This manual is also suitable for:

After effects cs4

Table of Contents