Pick-Whip Expression Examples; Example: To Turn A Dial And Illuminate A Lamp; Example: To Rotate The Hands Of A Clock - Adobe AFTER EFFECTS 7.0 Manual

Table of Contents

Advertisement

Pick-whip expression examples

Example: To turn a dial and illuminate a lamp

The following example shows how to use the pick whip to link opacity values to rotation values so that as rotation
changes, opacity changes, too. This expression could be used to simulate dimming a light bulb while rotating a dial.
Start with a composition containing two layers: one to be used as the switch that you'll rotate, and one to be used
1
as the object that changes in opacity as you rotate the switch. This example uses two Adobe Illustrator files and
named one "robot" and the other "switch". (See "About layers" on page 149.)
2
Create keyframes to animate the rotation of the switch layer. (See "Using keyframes" on page 192.)
Select the Opacity property for the robot layer and choose Animation > Add Expression. A default expression
3
appears under the property.
4
Click the pick whip next to the Opacity expression and drag it to the Rotation property for the switch layer. After
Effects automatically fills in the following expression:
t hisC omp.layer("switch.ai").rot at ion
Preview the animation. Notice that the Opacity property of the robot layer is animated, yet there are no opacity
5
keyframes. (See "Methods for previewing compositions" on page 134.)
Note: Make sure to use rotation values that are compatible with the Opacity property. For example, opacity values range
from 0 to 100, so rotating the switch layer backward using a negative value results in an opacity value of 0.
Expression linking opacity and rotation.

Example: To rotate the hands of a clock

The following example shows how to use the pick whip to link rotation values between layers. Quickly animate the
hands on a clock so that as the hour hand moves from hour to hour, the minute hand rotates the full circumference
of the clock face. This type of animation would take a long time to create if you had to set each keyframe for both
hand layers, but with the pick whip, you can do it in a matter of minutes.
1
Import or create two layers: an hour hand and a minute hand. (See "About layers" on page 149.)
Position them as if they were hands on a clock, and then set the anchor points for the hands at the center of the
2
clock. (See "About anchor points" on page 206.)
Set Rotation keyframes for the hour hand. (See "Using keyframes" on page 192.)
3
Select the Rotation property for the minute hand and choose Animation > Add Expression.
4
ADOBE AFTER EFFECTS 7.0
587
User Guide

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents