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.
Below an After Effects expressions list library with demo and download project links.
-
- Loop Expression
- Floating
- Wiggle Expression
- Bounce Expression
- Delay
- Blink Expression
- Text Bounding box
- Opacity
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”)
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.
Loop Offset
The loop offset expression allow your to repeat the first or last keyframe or offset the path overtime
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.
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.
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.
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.
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.
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
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.
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
Wiggle Height Vertical expression.
With this Wiggle expression you can animate vertically on the Y axis.
Wiggle Horizontal
Here is an expression to Wiggle Horizontally on the x axis.
Wiggle with Depth on Z axis
Change your layer to a 3D Layer and use this expression to wiggle on the Z axis.
Uniform Scale Wiggle
This expression allow you to Wiggle scale proportionally your layer.
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
Inertial Bounce Expression
This bounce expression allow you to have a elastic feel to your layer position
Scale Bounce Expression
Here is a super cool expression to make your layer bounce like jello or gelatin.
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.
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.
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
Blink Expression
On your layer opacity apply this script to make it blink, you can also customize the syntax if it blink to fast.
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.
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.
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





























Wonderful collection of expression.
Very useful.
Many Thanks.
Very useful, many thanks
Thank you so much for providing these. Thank you for your time.
You are very welcome, thank you for dropping a nice comment 🙂
Very useful, many thanks bro!
But, to prevent Blink expression sintaxe error, copy text with {} in the value “else”
blinkSpeed=15;
n= Math.sin(time*blinkSpeed);
if(n<0) {0}else{100};
Wow, these are all very help full, Thanks you so much.
You are welcome! Let me know if you are looking for a specific AE expression I will be happy to include it on this page. Thanks!
scale up and down subtle bounce type animation normally its called Velocity Bounce or Elastic Ease-Out Bounce)
You have really done well we upcoming animators
so helpful for newbie like me !!! tysm !!!
Really Very useful, many thanks
You’re welcome!
Great, many thanks!
THIS IS ABSOLUTELY AMAZING BRO
Thank you! for dropping a comment! 🙂
too much useful im too much inspired to learn.
Thank you for your feedback!! really appreciate it
Thank you so much for these! Very helpful and inspirational.
i just came up with this amazing set of code assest that really save a lot of time in after effects but i dont know were to paste it whether in position ,opacity, transform can somebody help me
Thank you! Def a bookmark for sure!!!
many thanks
thanks alot, this was helpful, thank you motion array
Absolutely amazing collection! I am returning to your website to read the tutorials and to experiment with the expression list. Thanks a lot for such a big giving!!!
Thanks for stopping by and leaving a comment! Glad the hard work is helping other motion designers 🙂
Great, thank you so much 🙂