Using Help | Contents | Index Back - Adobe AFTER EFFECTS 5.5 Help Manual

Table of Contents

Advertisement

Adobe After Effects Help
Using Help
|
Contents
Animating a clock Start with two layers: an hour hand and a minute hand. Set the anchor
points for the hands at the center of the clock (see "Setting and animating an anchor
point" on page 111). Set Rotation keyframes for the hour hand; select the Rotation
property for the minute hand and choose Animation > Add Expression. Drag the pick
whip to the hour hand's Rotation property. The following expression appears:
this_comp.layer("hour hand").rotation
To make the minute hand rotate 12 times faster than the hour hand, type "*12" at the end
of the expression as follows:
this_comp.layer("hour hand").rotation*12
Controlling blur by its horizontal position Start with one layer that is of smaller dimen-
sions than the composition. Set Position keyframes for the layer and then apply the Fast
Blur effect. Select the Fast Blur's Blurriness property in the Timeline window and choose
Animation > Add Expression. Drag the pick whip to the Position property, and the
following expression appears:
position[0]
If the blur is too intense, cut the blur amount by one-tenth by adding "/10" to the end of
the expression as follows:
position[0]/10
Successive scaling up of objects Start with three layers, positioned at the location you
want them to stream in from. Create Scale keyframes for the first layer. For example, make
Scale = 0 at 0 seconds and Scale = 100 at 6 seconds. Select the Scale property for the
second layer and choose Animation > Add Expression. Drag the pick whip to the Scale
property of the first layer. The following expression appears:
this_comp.layer("layer name").scale
To make the second layer scale 2 seconds later than the first, add the "value_at_time"
function to the end of the expression, such as:
this_comp.layer("layer name").scale.value_at_time(time-2)
Writing your own expressions
After Effects uses JavaScript 1.2 for expressions. JavaScript provides all the necessary state-
ments, functions, and operators for constructing expressions. To write your own expres-
sions, it may help to have some basic knowledge of JavaScript syntax and mathematics.
However, once you learn the basic logic behind creating an expression, you can write fairly
sophisticated expressions without ever looking at a JavaScript reference guide.
Write expressions directly in the expression field, or in any text editor, and then copy and
paste them to the expression field. For a quick reference to expression elements and their
proper syntax, use the language element menus. See "Using the expression language
menu" on page 252. For information on After Effects–specific language requirements, see
"Understanding the expression language" on page 249. For more information about
JavaScript, see a JavaScript reference manual, such as JavaScript: The Definitive Guide, by
David Flanagan.
Important: In JavaScript, a value stored in an object is called a property. However, After
Effects uses the term "property" to refer to layer attributes as defined in the Timeline
window. Consequently, for clarity, After Effects documentation refers to a JavaScript
Using Help
|
Contents
|
Index
|
Index
Creating Expressions
Back
248
Back
248

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents