Chapter 16: expressions, Working with expressions, About expressions – Adobe After Effects CS3 User Manual

Page 552

Advertising
background image

547

Chapter 16: Expressions

Working with expressions

Many of the examples in this section are based on examples provided by Dan Ebberts. Dan Ebberts also has an
excellent collection of example expressions and tutorials for learning how to work with expressions on his website:

www.adobe.com/go/learn_ae_motionscripthome

.

The AE Enhancers forum provides lots of examples and useful information about expressions, as well as scripts and
animation presets:

www.adobe.com/go/learn_ae_aeenhancershome

.

About expressions

When you want to create and link complex animations, but would like to avoid creating tens or hundreds of
keyframes by hand, try using expressions. With expressions, you can create relationships between layer properties
and use one property’s keyframes to dynamically animate other layers. For example, if you set Rotation keyframes
for a layer and then apply the Drop Shadow effect, you can use an expression to link the Rotation property’s values
with the Drop Shadow effect’s Direction values; that way, the drop shadow changes accordingly as the layer rotates.
You can even use the pick whip to link path properties, so a mask can take its path from a brush stroke or a shape
layer object.

Expressions are based on the standard JavaScript language, but you do not need to know JavaScript to use expres-
sions. You can create expressions by using the pick whip or by copying simple examples and modifying them to suit
your needs.

Note: Two great sources of example expressions are the Expression Sampler template project (File > Browse Template
Projects) and the animation presets in the Behaviors category (Animation > Browse Presets).

You can do all of your work with expressions in the Timeline panel, though it is sometimes more convenient to drag
the pick whip to a property in the Effect Controls panel. You can use the pick whip to create expressions, or you can
enter and edit expressions manually in the expression field, a resizable text field in the time graph. The expression
field appears alongside the property in layer bar mode; the expression field appears at the bottom of the Graph Editor
in Graph Editor mode. You can write an expression in a text editor and then copy it into the expression field. When
you add an expression to a layer property, a default expression appears in the expression field. The default expression
essentially does nothing—it sets the property value to itself.

Advertising