
AFTER EFFECTS CS3
User Guide
301
Example: Animate text position with expressions
This example uses the textIndex and textTotal attributes with the wiggle expression to animate a line of text.
1 Create a new composition.
2 Create a new text layer.
3 Expand the text layer in the Timeline panel to view the text properties. Add a Position animator group from the
Animate menu.
4 Delete the default Range selector, Range Selector 1.
5 Add an Expression selector by selecting the Add menu, then choosing Selector > Expression. Expand the
Expression selector to reveal its options.
6 Expand the Amount property to reveal the expression. The following expression appears by default:
selectorValue * textIndex/textTotal
7 Replace the default expression with the following expression:
seedRandom(textIndex);
amt=linear(time, 0, 5, 200*textIndex/textTotal, 0);
wiggle(1, amt);
The linear method is used in this example to ramp down the maximum wiggle amount over time.
8 Set the vertical position value. The greater the value, the more the characters wiggle.
9 Preview your composition.
See also
“Create a composition” on page 108
“Enter point text” on page 274
“Work with selectors” on page 289
“Set keyframes” on page 187
“Preview video and audio” on page 120
Example: Animate text as a timecode display
❖ With no layers selected in the Timeline panel, double-click the Current Time Format animation preset in the
Effects & Presets panel. (You can locate the animation preset by typing its name in the Contains field in the Effects
& Presets panel.)
Anewtextlayeriscreated,withanexpressionontheSourceTextpropertythatmakesthetextshowthecurrenttime
in the project’s current time display format.
You can use other expressions in the Global category to display time in another format.
To see the expressions on a layer, select the layer and press EE.
See also
“Global objects” on page 560
What talented message