Programing an After Effects expression from scratch can be very tricky on time consuming specially if you just started on After Effects so I have regrouped a bunch of After Effects scripts and providing the syntax, project files and demo example. This After Effects expression gallery should help you understand how to use codes and adapt it to your own animation.

Disclaimer: Most of those AE expression reference are programing code syntax that I have researched online and I am happy to refer your name if you are the programmer behind those fabulous codes. One the master I can’t thanks enough for his participation sharing his programing codes on all forum is Dan Ebberts.

My objective here is to provide you a lot of useful After Effects expressions reference that AE animators use. I am planning on constantly updating this page with new expression so beginners and experts can be more efficient and spend less hours on researching and figuring out programming codes in After Effects.

LoopIn Expression
This expression allow you  to loop anything before the first keyframe.

Download the loop-in expression project here

Copy to Clipboard

LoopOut Expression
This expression allow you  to loop anything after the last keyframe.

Download the loopOut Project file here

Copy to Clipboard

Ping Pong Expression
This expression allow your to loop back and forth 2 keyframes also called boomerang expression.
You can use either loopIn(“pingpong”) or loopOut(“pingpong”)

Download The PingPong expression here

Copy to Clipboard

Loop Continue Expression
The loopOut(“continue”) expression use the last keyframe to continue its direction and speed until the end of your timeline. This expression should be helpful if you want a layer to travel over time.

Download the continue loop project here

Copy to Clipboard

Loop Cycle
The loop cycle expression is basically the default value, when you write loopOut(“cycle”) it is the same as writing loopOut().
This expression can be more useful if you use an argument modifier.

Download the cycle expression here

Copy to Clipboard

Loop Offset
The loop offset expression allow your to repeat the first or last keyframe or offset the path overtime

Download the Offset Loop project example here

Copy to Clipboard

Loop Duration
The loop duration allow you to pause and repeating your loop after the set amount of seconds.
For example loopOutDuration(“cycle”,3) will repeating your loop after 3 seconds.

Download the Loop duration example here.

Copy to Clipboard

Loop a transition Effect with Expression

Let’s say you want to loop a transition effect that will play until the end of your timeline.

Download the effect loop expression here

Copy to Clipboard

Loop Argument Modifier Expression

Argument modifier allows to have a bit more control on how you want to loop your animation, the modifier is the number added a the end of your expression example: loopOut(“offset”, 2)

Download the argument modifier example

Copy to Clipboard

Floating Layer Expression
Ideal if you want an layer floating up and down, simulating an an object in bobbing up and down space or water.
It basically shows weightlessness of an object. You can use code this on the layer position and scale.

Download the floating expression here

Copy to Clipboard

Floating Bounce Layer with more control
Similar to the expression above, on this one you can control the movement and the frequency of you layer.

Download the Floating Bounce expression here

Copy to Clipboard

Delay Keyframe Expression

This expression allows your delay your keyframe animation where you can specify on which frame the animation should start. It is basically a pause before the animation start.

Download the delay expression project here.

Copy to Clipboard

Delay and Index a Layer

The Delay and index expression allow you to have other child parented layer following the main layer at a different time.

Download the Delay and Index a Layer expression here

Copy to Clipboard

Wiggle Simple Expression

wiggle(5,10)

  • The 1st number 5 define the number of time your layer will wiggle per second. This case it move 5 time in 1 second
  • The 2nd Number 10 define the how much it will move up and down this case 10 pixels

Download the wiggle AE project here

Copy to Clipboard

Start & Stop wiggle expression
With a slider control you can easily control your wiggle start and stop motion.

See the tutorial here or Download this project to see the expression.

Copy to Clipboard

Hold Wiggle Expression

If you want to pause your wiggle this expression should do it. The code allow you to stop the wiggle at frame 100

Download the hold wiggle expression here

Copy to Clipboard

Wiggle Height Vertical expression.

With this Wiggle expression you can animate vertically on the Y axis.

Download the wiggle vertical AE project here.

Copy to Clipboard

Wiggle Horizontal

Here is an expression to Wiggle Horizontally on the x axis.

Download the horizontal wiggle here.

Copy to Clipboard

Wiggle with Depth on Z axis

Change your layer to a 3D Layer and use this expression to wiggle on the Z axis.

Download the Wiggle Z Axis project here.

Copy to Clipboard

Uniform Scale Wiggle

This expression allow you to Wiggle scale proportionally your layer.

Download the uniform scale expression here

Copy to Clipboard

Wiggle Seamless Loop Expression

This wiggle expression allow you to loop perfectly. Just don’t forget to adjust the loopTime base on your composition timeline

Download the Loop Wiggle expression here

Copy to Clipboard

Inertial Bounce Expression

This bounce expression allow you to have a elastic feel to your layer position

Download the inertial bounce expression

Copy to Clipboard

Scale Bounce Expression
Here is a super cool expression to make your layer bounce like jello or gelatin.

Download the scale bounce expression project here

Copy to Clipboard

Ball Bounce Expression

Here is a beautiful expression that mimic a ball bounce with gravity and elasticity options, many thanks to school of motion for the script please go to their website for more detail on this specific bouncing expression.

Download the ball bounce expression here

Copy to Clipboard

Rotation Bounce Expression

Make 2 keyframes and apply this rotation bounce expression.
Thanks again to school of motion for the script please go to their website for more detail on this specific bouncing expression.

Download the rotation-bounce project here

Copy to Clipboard

Text Bounce Expression

With the text bounce expression you can easily change the bounce frequency, the bounce character delay, the bounce decay and bounce start by the using the slider control in the effect control window. See screenshot below

Download the text bounce project here

Copy to Clipboard

Blink Expression

On your layer opacity apply this script to make it blink, you can also customize the syntax if it blink to fast.

Download the blink expression project here

Copy to Clipboard

After Effects Text Bounding box
Here is the expression to autoscale a text box in After Effects, that should save you a lot of time.
first expression should be applied to the size of your rectangle shape and the second should be added to the anchor point of your rectangle shape.

Download the dynamic text box auto resize project here

Copy to Clipboard

Fade Layer base on Camera Distance
There is a cool script I found on motion-graphics-exchange website, that allows you to fade in a layer base on your camera distance.
Just apply this script to the opacity of your layer, the layer will fade in when it get closer to the camera.

This code is useful when you want to do a fake the depth of field and control when your layers need to fade in.

 Download camera distance script AE project here

Copy to Clipboard

Did you like the after effects expressions cheat sheet above ?

Please use the comment area below to share your expression questions, errors and bugs you might have. Thanks