User Guide

309
Chapter 10: Creating
Expressions
o create elaborate motion and effects, define the value of a property using a mathe-
matical function, or create an automatically updated relationship between two
properties, use expressions. Expressions can animate layer properties without (or in
addition to) keyframes. You can create expressions by simply dragging the pick whip ( )
from one property to another, by dragging the pick whip and then editing the resulting
equation with simple math functions such a a scale factor, or by writing your own Java-
Script equations.
Using expressions
Expressions can create a relationship between two properties. For example, if a layer
rotates and has the Drop Shadow effect applied, you can add an expression to the Rotation
property to link the rotation values with the Drop Shadow’s Direction values so that as the
layer rotates, the drop shadow changes accordingly. See “Creating expressions with the
pick whip on page 312.
Note: The After Effects Production Bundle also includes Motion Math scripts (see online
help). Some scripts may be easier to use than expressions; for example, to create effects that
synchronize all the audio layers in a composition, use the cmpaud.mm script, or to scale and
reposition all layers in a composition, use the scaleall.mm script.
Expressions are based on the standard JavaScript language—but you don't need to know
JavaScript to use expressions. Instead, you can create expressions by using the pick whip,
by using simple examples and modifying them to suit your needs, or by chaining objects
and methods together using the expression language guide (see “After Effects expression
language guide on page 324). If you have even a basic understanding of JavaScript, you
can write expressions that create sophisticated relationships between layer properties.
T
UG.book Page 309 Wednesday, February 21, 2001 12:05 PM