My First Expression


Why It Still Feels Like Magic.
By Austin Joseph | Motion Designer
After Effects expressions used to terrify me. All those brackets, semicolons, and code that looked like alien language. I was convinced I needed a computer science degree just to make a logo spin twice.
Then I discovered one tiny line of code that changed everything: loop().
This single expression became my gateway into the world of automated animation, and it's still the first thing I teach anyone who wants to dip their toes into After Effects scripting.
What is loop() and Why You Need It
The loop() expression does exactly what it sounds like—it makes any animation repeat infinitely without keyframes. Instead of copying and pasting keyframes for 30 seconds of spinning logos, you animate it once and let loop() handle the rest.
Here's the magic: type loopOut() in any property, and After Effects repeats whatever animation you've created forever.
Before loop(): The Hard Way
- Animate rotation from 0° to 360° over 1 second
- Copy those keyframes 29 more times for a 30-second loop
- Pray you never need to change the timing
After loop(): The Smart Way
- Animate rotation from 0° to 360° over 1 second
- Add loopOut() expression
- Done. Infinite smooth rotation.
Step-by-Step: Your First After Effects Expression Tutorial
Step 1: Create any animation with keyframes (rotation, position, scale)
Step 2: Alt+Click (PC) or Option+Click (Mac) the stopwatch icon next to your animated property
Step 3: Type: loopOut()
Step 4: Press Enter
Step 5: Watch your animation repeat forever
That's it. You just wrote your first expression.
Top 5 Essential After Effects Expressions for Beginners
1. loopOut() - The Gateway Expression
What it does: Repeats your animation infinitelyWhen to use: Spinning logos, breathing effects, ambient motionCode: loopOut()
2. loopOut("pingpong") - The Bounce Back
What it does: Animation plays forward, then backward, then repeatsWhen to use: Floating elements, pendulum motion, breathing effectsCode: loopOut("pingpong")
3. wiggle() - The Random Motion Maker
What it does: Adds random movement to any propertyWhen to use: Handheld camera feel, organic motion, jittery textCode: wiggle(2,10)
(2 times per second, 10 units of movement)
4. time - The Constant Motion Driver
What it does: Creates motion that never stops, tied to timelineWhen to use: Clock hands, consistent rotation, linear movementCode: time*100
(moves 100 units per second)
5. ease() - The Smooth Operator
What it does: Smooths out harsh linear motionWhen to use: Making robotic movement feel naturalCode: ease(time, 0, 1, 0, 100)
(smooth transition from 0 to 100)
Why loop() Changed My Animation Workflow
Before expressions, I was a keyframe slave. Every project meant hours of copying, pasting, and adjusting timing. One client revision could mean redoing dozens of keyframes.
The loop() expression taught me that smart animation beats hard work. Instead of wrestling with keyframes, I started thinking about motion systems. How can I set up animation once and let the computer handle repetition?
This mindset shift made me faster, more flexible, and honestly, a better animator. When you're not bogged down in manual keyframe management, you have more mental energy for creative decisions.
My Daily Expression Workflow
Morning routine: Start every project by setting up basic loops for background elements. Subtle rotations, gentle floating, ambient motion that brings scenes to life.
Client revisions: When timing changes come in (and they always do), expressions adapt automatically. No more rebuilding animations from scratch.
Final polish: Use wiggle() for organic camera movement, ease() for smoother transitions, and custom expressions for complex motion systems.
When NOT to Use Expressions
Don't fall into the automation trap. Expressions work best for:
- Repetitive motion (loops, cycles, patterns)
- Mathematical relationships (one thing affects another)
- Random or organic movement (wiggle, noise)
Avoid expressions for:
- Unique, artistic motion that needs human touch
- Complex emotional animation requiring nuanced timing
- Simple one-off movements where keyframes are faster
Beyond loop(): Building Your Expression Library
Once loop() clicks, you'll want to explore more. Here are beginner-friendly next steps:
Math-based expressions: value*2
(doubles any property)Conditional expressions: if (condition, valueA, valueB)
Property linking: thisComp.layer("Layer Name").transform.position
The key is starting simple. Master loop(), then add one new expression per project. Before you know it, you'll have a toolkit of automation that makes animation faster and more creative.
The Magic is in the Simplicity
That first time I typed loopOut() and watched my logo spin infinitely, it felt like magic. Not because the code was complex, but because it was so beautifully simple.
One line of text replaced hours of manual work. That's when I realized expressions aren't about replacing creativity—they're about amplifying it. They handle the tedious stuff so you can focus on making things look amazing.
The best part? You don't need to be a programmer. You just need to be curious enough to try typing four letters into a text field.
Start with loop(). Watch the magic happen. Then get ready to discover what else is possible when you let a little code enhance your intuition instead of replacing it.