Expressions in After Effects for Beginners: Add Expressions, wiggle, time, loopOut and Automate Animation Without Keyframes

Adobe After Effects 60 min min read Updated: Nov 17, 2026 Intermediate
Expressions in After Effects for Beginners: Add Expressions, wiggle, time, loopOut and Automate Animation Without Keyframes
Intermediate Topic 1 of 3

What Is an Expression?

An expression is a small piece of JavaScript attached to a property. It calculates the property's value on every frame. It saves keyframes and makes animation that repeats or reacts.

Add an Expression

  1. Select a property, for example Position
  2. Press Alt + click on its stopwatch (on Mac, Option + click)
  3. Type the expression in the text field in the Timeline
  4. Click outside the field to apply it

Three Starter Expressions

ExpressionWhat it does
wiggle(2, 30)Random shake: 2 times per second, up to 30 units
time * 90Value grows 90 each second. On Rotation it spins
loopOut()Repeats the keyframes after the last one
  • wiggle(freq, amp) on Position makes a shaking camera
  • time * 360 on Rotation spins once per second
  • loopOut("cycle") repeats a bounce forever, loopOut("pingpong") plays back and forth

Time-Based Values

python # Simulate: Rotation = time * 90 at 25 fps fps = 25 for frame in [0, 25, 50, 75, 100]: t = frame / fps print("frame", frame, "time", t, "rotation", t * 90) # A fixed-seed wiggle-like shake import random random.seed(1) amp = 30 print([round(random.uniform(-amp, amp), 1) for _ in range(5)])
Result

frame 0 time 0.0 rotation 0.0 | frame 25 time 1.0 rotation 90.0 | frame 50 time 2.0 rotation 180.0 | frame 75 time 3.0 rotation 270.0 | frame 100 time 4.0 rotation 360.0 | [-21.9, 20.8, 15.8, -14.7, -0.3]

Rotation grows steadily with time. The shake values are random within the amplitude range, so the real wiggle differs, but the idea is the same.

Errors

A yellow warning or red bar shows that the expression has a problem. Click the warning to read the message. Typical causes are a missing bracket, a wrong property name or a missing quote.

Quick toggle Click the equals sign icon beside an expression to turn it off and on and compare.

Practice

  1. Add wiggle to Position of a layer
  2. Spin a layer with time * 180 on Rotation
  3. Animate a bounce with two keyframes and loopOut("pingpong")
  4. Break an expression on purpose and read the error

Conclusion

Expressions add automation. Start with wiggle, time and loopOut.

Quick Summary: What expressions are; adding; starter expressions; time values; errors.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators