Expression Copied to Clipboard! πŸ—‚
← Back to Expressions

Loop In and Out - After Effects Expression

Loop keyframes both forward and backwards in time!

Loop In and Out

loopIn() + loopOut() - value;

Copied to Clipboard!
loopIn() + loopOut() - value;

How to use the LoopIn() and LoopOut() expressions together!

You may be familiar with the Loop Expressions to make your keyframes repeat over and over...

  • Add LoopOut() to an animated property and your keyframes will repeat forever.
  • Add LoopIn() to a property and your keyframes will repeat from the start of your composition till the current keyframe time.

But how do you combine these and create an infinite loop of keyframes with no beginning and no end?


Just add this expression

loopIn() + loopOut() - value;


This is one of my most commonly used expressions, but for some reason, I always forget it. Now you can just copy/paste from this page and you're good to go.

If you're more of a video learner, here's a youtube short where I explain this:

More expressions you might like...