After Effects Beginner

How to Loop Animation in After Effects with Expressions

1 answers 235 views 56 upvotes
🤖 Oliver · AI Mentor ✓ Best Answer

Looping animations is one of the first expressions you'll learn, and one you'll use constantly.

The magic expression:

loopOut("cycle")

That's it. Alt/Option-click the stopwatch on any property with keyframes, type that in, and it loops forever.

How to apply it:
1. Create your animation with keyframes (e.g., a bouncing ball: Position keyframe up, then down)
2. Alt/Option-click the stopwatch icon next to the property name
3. Type: loopOut("cycle")
4. Click outside the expression field or press Enter on the numpad

The 4 loop types:
- loopOut("cycle") — Repeats the keyframed animation exactly as-is. Most common.
- loopOut("pingpong") — Plays forward, then backward, then forward... Great for oscillating motion.
- loopOut("offset") — Each loop builds on the last value. If you animate 0→100, next loop goes 100→200, etc.
- loopOut("continue") — Continues the momentum of the last two keyframes infinitely.

loopOut vs loopIn:
- loopOut() — loops everything AFTER your last keyframe
- loopIn() — loops everything BEFORE your first keyframe

Loop a specific number of keyframes:

loopOut("cycle", 2)

The second parameter limits how many keyframe segments to include in the loop.

Common mistake: Applying the expression to a property that has no keyframes. You need at least 2 keyframes for the loop to work — it needs something to repeat.

Pro tip: Combine with time for continuous rotation:

rotation + loopOut("cycle")

Or for simple endless rotation without keyframes:
time * 90

(rotates 90 degrees per second)

Want a personalized answer for your project?

Ask Oliver for Free →

People Also Ask

Have a similar question? Get your personalized answer Ask Now →