Article

After Effects Expressions: What You Need To Know To Get Started

by

If you've ever wanted to make After Effects do your bidding without manually keyframing every single property, expressions are about to become your new best friend.

Expressions are snippets of code that automate animation, link properties together, and help you work smarter instead of harder. They might look intimidating at first, especially if you've never written a line of code, but here is the truth: you do not need to be a programmer to use them. Most motion designers start with a handful of simple expressions and build from there.

In this guide, we will break down what After Effects expressions are, why they matter, and the most important tips to get you animating with code quickly.

What Are After Effects Expressions?

After Effects expressions are small pieces of JavaScript code that you can apply to any layer property to control its behavior dynamically. Instead of setting keyframes manually, you write or paste code that tells After Effects how that property should behave based on time, other layers, or random values.

Think of expressions as invisible puppet strings. You are not moving the puppet frame by frame. You are setting rules for how it moves, and After Effects handles the rest.

For example:

  • Want a layer to rotate continuously without setting dozens of keyframes?Use an expression.

  • Need text to count up from 0 to 100? Use an expression.

  • Want one layer's position to follow another with a delay? Use an expression.

Expressions live in the Timeline panel and can be added to any property with a stopwatch icon. Once applied, they override keyframes unless you intentionally combine them, giving you procedural control over your animation.

The Most Important Tips for Getting Started (Ranked)

1. Start With the Wiggle Expression

This is the gateway drug to expressions, and for good reason: it's simple, powerful, and instantly useful.

The wiggle expression adds random movement to any property.

Here's the code:

wiggle(frequency, amplitude)

  • Frequency = how many times per second it wiggles
  • Amplitude = how much it moves

Example:

wiggle(2, 50)

This makes your layer wiggle twice per second, moving up to 50 pixels in any direction.

Why it's #1: It requires no setup, works on almost any property such as position, rotation, scale, or opacity, and instantly adds organic motion. It is perfect for camera shake, jittery text, floating elements, and more.

Pro tip: Apply wiggle to the position of a null object and parent your layer to the null. This allows you to keyframe the main motion while wiggle handles secondary movement.

2. Learn the Time Expression for Continuous Loops

If you want something to rotate, count, or move continuously without keyframes, the time expression is your answer.

time * speed

  • time = current time in seconds
  • speed = how fast you want it to move

Example (for rotation):

time * 100

This rotates your layer 100 degrees per second, forever.

Why it's #2: It's the foundation for creating infinite loops, spinning logos, scrolling backgrounds, and ticking clocks. Once you understand time, you can start building more complex time-based animations.

Want it to rotate the other direction? Use a negative number:

time * -100

3. Use the Pick Whip to Link Properties

Not ready to write code yet? The pick whip (the spiral icon next to any property) lets you link properties visually.

Click and drag the pick whip from one property to another, and After Effects writes the expression for you.

Example:

  • Drag from Layer 2's Position to Layer 1's Position
  • Now Layer 2 will follow Layer 1 wherever it goes

Why it's #3: It's a zero-code way to start thinking like an expression user. You're creating relationships between properties, which is the entire point of expressions. Plus, you can see the generated code and start learning syntax by example.

Advanced move: After pick-whipping, you can modify the expression. For example:

thisComp.layer("Layer 1").transform.position + [100, 0]

Now Layer 2 follows Layer 1, but offset 100 pixels to the right.

If you're ready to dive deeper into these techniques, Expression Session walks you through real-world expression workflows step by step.

4. Master the Index Expression for Repeating Elements

Got a grid of shapes or a sequence of layers that need to animate with variation? Index is the answer.

index

This returns the layer's number in the timeline. Combine it with other expressions to create automatic offsets.

Example (for opacity):

index * 10

If you have 10 layers, each one will be 10% more opaque than the last.

Example (for time delay):

delay = index * 0.1;

wiggle(2, 50, 1, 0.5, time - delay)

Each layer wiggles, but starts slightly later based on its index.

Why it's #4: Once you understand index, you can duplicate a layer 50 times and have each one behave slightly differently—without touching a single keyframe. It's the secret weapon for motion graphics that feel procedural and scalable.

A cascading animation of circles, each slightly delayed, with the expression index * 0.1 visible in the corner

5. Copy and Modify Existing Expressions

You do not need to memorize syntax. The fastest way to learn is to copy working expressions and adjust them.

Here's how:

  1. Search "[what you want to do] After Effects expression" (e.g., "smooth follow After Effects expression")
  2. Copy the code
  3. Paste it into your property
  4. Change the numbers to see what happens

Why it's #5: Expressions are about solving problems, not programming from scratch.

Bookmark resources like Adobe's Expression Reference and MotionScript, a community-driven expression library!

6. Use the Expression Editor Menu (The Chevron Icon)

When you Alt or Option-click a stopwatch to enable expressions, you will see a small chevron icon. Click it.

This opens a menu with:

  • Property links (shortcuts to common properties like position, scale, opacity)
  • Expression language menus (pre-built functions like loopOut(), linear(), ease())
  • JavaScript math and logic operators

Why it's #6: It's a cheat sheet built into After Effects. You don't have to remember how to write thisComp.layer("LayerName").transform.position, you can just click through the menu, and After Effects writes it for you.

7. Add Comments to Keep Things Organized

Once you start writing longer expressions, you'll thank yourself for adding comments.

Use // to add a comment:

// This makes the layer wiggle

wiggle(2, 50)

Why it's #7: Future you (or a teammate) will have no idea what Math.sin(time * 3) * 200 does. Comments keep your project readable and maintainable.

8. Learn loopOut() for Repeating Keyframes

If you've keyframed an animation and want it to repeat forever, use:

loopOut("cycle")

Other options:

  • loopOut("pingpong") plays forward, then backward

  • loopOut("offset") repeats while continuing movement

Why it's #8:
It saves time by eliminating the need to duplicate keyframes.

Pair this with our After Effects Insider course to understand how expressions and keyframes work together in professional workflows.

9. Use the Expression Controls Effect

Want to control an expression with a slider instead of digging into code every time? Add an Expression Control effect (like Slider Control or Checkbox Control).

Example:

  1. Add Effect > Expression Controls > Slider Control to your layer
  2. In your expression, pick-whip to the slider:

effect("Slider Control")("Slider")

Now you can adjust the expression value in the Effect Controls panel like any other effect.

Why it's #9: It makes expressions user-friendly. You can even save these as animation presets and share them with your team.

10. Don't Be Afraid to Break Things

The best way to learn expressions is to experiment. Apply random expressions to random properties and see what happens. After Effects won't explode. The worst that will happen? Undo is always there to save the day.

Why it's #10: Expressions are iterative. You rarely get them right the first time, and that's okay. The process of tweaking, testing, and breaking things is how you build intuition.

If you want to level up your problem-solving and creative coding skills, Advanced Motion Methods teaches advanced expression techniques alongside rigging, automation, and procedural workflows.

Quick Takeaways

  • Wiggle is the easiest and most useful expression to start with
  • Time creates continuous, keyframe-free loops
  • The pick whip lets you link properties visually without writing code
  • Index automates variation across multiple layers
  • Copy, modify, and experiment with existing expressions. You don't need to be a coder
  • Use the expression editor menu (chevron icon) as a built-in reference
  • Add comments to keep your expressions readable
  • loopOut() repeats keyframed animations infinitely
  • Expression Controls make expressions adjustable without editing code
  • Break things on purpose, that's how you learn

Ready to Go Deeper?

Expressions unlock efficiency and creative flexibility in After Effects. Once you understand the fundamentals, you will start spotting automation opportunities everywhere.

If you're serious about mastering expressions (and the motion design mindset that makes them second nature), check out Expression Session. It's designed specifically for motion designers who want to stop being intimidated by code and start using expressions like a pro.

Get instant access to all our courses, including After Effects Insider, Advanced Motion Methods and dozens more by signing up to our All-Access program, and level up your entire mograph skillset!

FAQs

Do I need to know JavaScript to use After Effects expressions?
No. Most designers begin by copying and modifying expressions. Over time, the syntax becomes familiar.

Can I use expressions and keyframes together?
Yes. Expressions can modify keyframed values. For example, keyframe position and add wiggle() for organic movement.

What is the difference between an expression and a script?
Expressions control individual properties and update in real time. Scripts automate larger project-level tasks and are accessed through File > Scripts.

Why is my expression not working?
Common issues include typos, missing semicolons, incorrect layer names, or applying an expression to an incompatible property type.

Where can I find pre-made expressions?
MotionScript has a huge library of community-contributed expressions. Adobe's Expression Reference is also a goldmine once you know what you're looking for.

The All-Access discount is SOLD OUT, but you can still get 25% off all individual courses! We’ve been quietly rolling out our new All-Access program, where you can get every course we make for one low price. It’s a crazy good deal even without this sale. But until Wednesday 12/4, you can get it for 25% off. For this sale we are opening up 100 spots. After those sell out, you’ll have to wait at least a few months until we open more. Don’t sleep on this deal. We expect it to sell out fast.

ENROLL NOW!

Acidbite ➔

50% off everything

ActionVFX ➔

30% off all plans and credit packs - starts 11/26

Adobe ➔

50% off all apps and plans through 11/29

aescripts ➔

25% off everything through 12/6

Affinity ➔

50% off all products

Battleaxe ➔

30% off from 11/29-12/7

Boom Library ➔

30% off Boom One, their 48,000+ file audio library

BorisFX ➔

25% off everything, 11/25-12/1

Cavalry ➔

33% off pro subscriptions (11/29 - 12/4)

FXFactory ➔

25% off with code BLACKFRIDAY until 12/3

Goodboyninja ➔

20% off everything

Happy Editing ➔

50% off with code BLACKFRIDAY

Huion ➔

Up to 50% off affordable, high-quality pen display tablets

Insydium ➔

50% off through 12/4

JangaFX ➔

30% off an indie annual license

Kitbash 3D ➔

$200 off Cargo Pro, their entire library

Knights of the Editing Table ➔

Up to 20% off Premiere Pro Extensions

Maxon ➔

25% off Maxon One, ZBrush, & Redshift - Annual Subscriptions (11/29 - 12/8)

Mode Designs ➔

Deals on premium keyboards and accessories

Motion Array ➔

10% off the Everything plan

Motion Hatch ➔

Perfect Your Pricing Toolkit - 50% off (11/29 - 12/2)

MotionVFX ➔

30% off Design/CineStudio, and PPro Resolve packs with code: BW30

Rocket Lasso ➔

50% off all plug-ins (11/29 - 12/2)

Rokoko ➔

45% off the indie creator bundle with code: RKK_SchoolOfMotion (revenue must be under $100K a year)

Shapefest ➔

80% off a Shapefest Pro annual subscription for life (11/29 - 12/2)

The Pixel Lab ➔

30% off everything

Toolfarm ➔

Various plugins and tools on sale

True Grit Texture ➔

50-70% off (starts Wednesday, runs for about a week)

Vincent Schwenk ➔

50% discount with code RENDERSALE

Wacom ➔

Up to $120 off new tablets + deals on refurbished items

Success! Check your email (including spam folder) for your download link. If you haven't yet confirmed your email with us, you'll need to do that one time.
Oops! Something went wrong while submitting the form.
Featured