Adobe After Effects Deep Dive: 25 Expressions That Save Hours
A working After Effects expressions guide with 25 production-ready snippets that replace keyframes, automate motion and save hours on every project.
If you have ever sat in front of a 400-frame timeline keyframing the same wiggle, bounce or counter, you already know the problem. An After Effects expressions guide is not about showing off code — it is about deleting work. The 25 snippets below replace keyframes you should not have to set, and once they live in your shortcuts, a one-hour shot becomes a fifteen-minute shot.
Why expressions matter more than ever
Studios in Mira Road, Andheri and Goregaon are turning around explainer videos, app demos and broadcast packages on tighter deadlines than ever. Motion designers who can write three lines of JavaScript inside an expression field finish twice the work of designers who cannot. At Storyboard's Mira Bhayandar campus, we see this gap close fast — students who understand expressions move from junior to mid-level roles in roughly half the time.
An expression is just a tiny script attached to a property. It tells After Effects what value to use at every frame, so you stop hand-keying and start describing behaviour. Think of it as the difference between drawing every frame of a clock ticking versus telling the clock how to tick.
Setting up your expressions workspace
Before the snippets, fix your environment so you can actually use them.
- Switch the expression editor to a larger font under Preferences, General.
- Enable Show Expression Errors so you catch typos immediately.
- Pin the Expression Language menu to the side of your timeline.
- Save your most-used snippets to Animation, Save Animation Preset for one-click reuse.
- Keep an Expression Controls layer at the top of every comp for sliders and checkboxes.
That last point alone will save you the most time. Almost every expression below works better when paired with a Slider Control so the art director can tweak values without touching code.
The 25 expressions every motion designer should know
These are grouped by use case so you can scan for the one you need on a live project. Drop them into the property's expression field using Alt-click (Option-click on Mac) on the stopwatch.
Movement and physics
- Wiggle with control —
wiggle(thisComp.layer("Controls").effect("Amount")("Slider"), 50)gives the director a slider instead of a fight. - Loop out cycle —
loopOut("cycle")makes any two-keyframe animation play forever without copy-pasting. - Loop out ping pong —
loopOut("pingpong")for breathing logos, hovering UI cards, idle character moves. - Bounce on stop — the classic post-keyframe bounce expression turns a hard stop into a satisfying settle. Search "Dan Ebberts bounce" if you do not have it memorised yet.
- Inertial bounce — adds overshoot when a layer arrives at its target, perfect for cursor and pointer animations.
- Spring physics —
amp = .1; freq = 2.0; decay = 4.0;plus the standard spring block gives you UI feel without any keyframes after the second. - Overshoot — multiply the value by
1 + Math.sin(time*10)*0.05*Math.exp(-time)for a quick punch on entry. - Random within range —
random(min, max)is the fastest way to dirty up a too-clean grid of elements. - Seed random —
seedRandom(index, true); random(0, 100)locks the value per layer so it does not change every preview. - Time-based wobble —
Math.sin(time*3)*10is wiggle's smoother cousin for breathing icons and pulsing dots.
Layout, UI and mograph expressions
These mograph expressions are the ones you will use most often on app demos, dashboards and explainers — the kind of work designers on the UI/UX Design programme ship every week.
- Counter that respects commas — wrap your slider in
Math.round(...).toLocaleString("en-IN")for Indian-format numbers like 1,00,000. - Percentage tied to progress —
Math.round(thisComp.layer("Bar").transform.scale[0]) + "%"links a text counter to a bar's actual scale. - Auto-fit text background — pick width from
thisComp.layer("Label").sourceRectAtTime().width + 40so the pill always hugs the text. - Stagger by index —
delay = index*0.1; valueAtTime(time - delay)cascades a whole row of icons from a single keyframed master. - Snap to grid —
Math.round(value/40)*40forces a layer onto a 40 px grid, useful for product UI breakdowns. - Anchor to layer edge —
thisComp.layer("Card").toComp([0,0])glues a label to a moving card without parenting. - Path along null —
thisComp.layer("Null 1").toComp(thisComp.layer("Null 1").anchorPoint)lets you animate complex routes with one null. - Camera-aware scale — divide your scale by camera distance to keep a tooltip readable as the camera moves.
Audio, time and data
- Audio amplitude to scale — convert audio to keyframes, then
[100 + audio*5, 100 + audio*5]makes any logo react to music. - Time remap freeze —
timeRemap = clamp(time, 0, 2)freezes a video on its last frame at the two-second mark. - Posterize time —
posterizeTime(8); wiggle(2, 30)gives wiggle a stop-motion feel for hand-drawn looks. - Read from JSON —
footage("data.json").sourceData.userspulls live data into a text layer, brilliant for dashboards. - Date stamp —
var d = new Date(); d.toLocaleDateString("en-IN")puts today's date on a slate or report. - Frame counter —
Math.floor(timeToFrames(time))for shot logs and burn-ins. - Conditional visibility —
if (thisComp.layer("Switch").effect("On")("Checkbox").value == 1) 100 else 0toggles opacity from a single control.
How to actually remember these
Memorising 25 lines of code is pointless. Instead, build a personal library.
- Create a folder called AE Snippets on your desktop.
- Save each expression as a plain text file with a descriptive name like
loop-cycle.txt. - After two weeks, move the five you use most into Animation Presets.
- Assign hotkeys via KBar or FX Console so you never type them again.
- Review the folder every Friday and delete what you have not used.
Within a month, you will have a personal AE scripting kit that is faster than any tutorial library on YouTube. The designers we see climbing fastest at Storyboard's motion graphics programme all do some version of this.
When to graduate to real scripts
Expressions live on individual properties. Scripts live in the File menu and can build entire compositions. Once you find yourself writing the same expression on twenty layers, it is time to learn ExtendScript or the new UXP panels.
Common signs you have outgrown expressions:
- You are pasting the same code on dozens of layers.
- You want to create layers, not just animate them.
- You need to talk to other apps like Photoshop or Premiere.
- You want a button-driven panel for your team.
This is where AE scripting starts to pay off. A 50-line script that imports a CSV and builds a lower-third for each row can replace an entire afternoon of manual layout. Studios in Mumbai and Thane are increasingly hiring motion designers who can write these helpers, because one designer with scripts does the work of three without.
Common mistakes that slow people down
Most expression headaches come from a handful of repeat offenders.
- Forgetting the semicolon at the end of variable lines.
- Using
transform.positionwhen the layer has separated dimensions. - Referencing a layer by name after renaming it.
- Mixing arrays and numbers —
value + 10fails on a position property; usevalue + [10, 0]. - Leaving
wiggle()on a property that already has keyframes you want to keep, then wondering why the motion looks wrong.
Fix these five and you will spend more time animating and less time debugging.
Where to take this next
Expressions are the gateway drug to a much bigger toolkit — rigging, procedural animation, data-driven graphics for news and sports broadcast, and eventually full pipeline scripting. If you want a structured path, our students in Mira Road work through expressions in week three of the motion course and ship a scripted explainer by week eight. Browse the student showcase to see what that looks like in practice, or read more deep dives on the Storyboard blog.
The goal is not to know all 25 expressions by heart. The goal is to never keyframe the same wiggle twice.
Ready to go from keyframes to code
If you are based around Mira Road, Bhayandar, Dahisar or anywhere across Mumbai and want hands-on training in After Effects, mograph expressions and AE scripting on real client briefs, Storyboard's on-campus motion and UI/UX programmes will get you production-ready faster than self-study alone. Call our admissions team on 091521 55527 or visit the contact page to book a campus tour and a free trial class.
Want to study this craft?
Talk to our admissions team about programmes, fees, and cohort dates that match your career goals.
Keep reading
Related stories
- 7 min read
How to Write a Standout Cover Letter for Animation Studios
A practical animation cover letter guide for Indian students applying to studios in Mumbai and beyond, with structure, language, and portfolio tips.
By Storyboard TeamRead - 7 min read
Parents' Guide: Is an Animation Career a Safe Bet in 2026?
A practical parents guide to whether an animation career is safe for kids in 2026, with salary ranges, job demand and decision checkpoints.
By Storyboard TeamRead - 7 min read
Republic Day Offer Guide: How to Stack Discounts on Long Courses
A practical guide to Republic Day course offers Mumbai students can actually stack on long-format animation, design and VFX programmes.
By Editorial DeskRead
