ADOBE AFTER EFFECTS 7.0
User Guide
311
7 Choose Add > Selector > Expression. If the Wiggly selector doesn’t come before the Expression selector, drag the
Wiggly selector above the Expression selector.
8 Expand the Expression Selector.
9 Expand the Amount property group to reveal the expression. The following expression appears by default:
selectorValue * textIndex/textTotal
10 Replace the default expression text with the following expression:
r_val=selectorValue[0];
if(r_val < 50)r_val=0;
if(r_val > 50)r_val=100;
r_val
11 Set the opacity to 0%, and preview your animation.
See also
“To create a composition” on page 109
“To enter point text” on page 283
“About the Expression selector” on page 302
“Wiggly selector properties” on page 302
“Methods for previewing compositions” on page 134
Example: To 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. Be sure to click in the Timeline panel first to deselect the animator group, and
then select Range Selector 1 to delete it.
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 animation.