Expressions
Write JavaScript-based code to automate animations and create dynamic relationships between properties.
Shortcut: Alt-click Stopwatch (Opt-click)Advanced20 min readQuick Reference
Expressions
Adobe After EffectsAlt-click (Mac: Opt-click) any property's stopwatch icon in the Timeline to add an expression. The expression editor ope
Best Used For
- ▸Automating repetitive animations
- ▸Creating dynamic relationships between properties
- ▸Adding random motion with wiggle expressions
- ▸Looping animations infinitely with loopOut()
Key Settings
Expressions are JavaScript snippets that automate and enhance your animations. A simple 'wiggle(5,20)' creates realistic camera shake, while 'loopOut()' repeats keyframes indefinitely. Expressions save hours of manual keyframing and open up creative possibilities impossible to achieve by hand.
Where to Find
Alt-click (Mac: Opt-click) any property's stopwatch icon in the Timeline to add an expression. The expression editor opens in the Timeline panel.
How to Use
- Basic Expression: Type 'wiggle(5, 20)' for a random shaking effect (5 times/sec, 20 pixels range)
- Loop: Use 'loopOut()' to repeat a keyframed animation infinitely
- Link Properties: Point to another property with 'thisComp.layer("Layer Name").transform.position'
- Time: Use the 'time' variable for time-based animations
- Toggle: Alt-click the stopwatch again to toggle the expression on/off
Pro Tips
- Use the Pick Whip (spiral icon) to link expressions to other properties visually
- Copy and paste expressions between properties
- Save useful expressions as Animation Presets for reuse
- Learn basic JavaScript — expressions use ECMAScript 3 syntax