A simple time-based expression that creates continuous motion or animation without keyframes.
time * 100
// Multiplies the current comp time (in seconds) by 100
// So the value increases by 100 every second
// You can replace 100 with any number to control speed
Apply this expression to:
Rotation
Position (X or Y separately)
Scale (individual axes)
Opacity (used with extra math like sine)
The time
expression tracks how many seconds have passed in your composition. So when you multiply time
by a number, you're creating a value that grows steadily over time.
For example:
At 0 seconds → value = 0
At 2 seconds → value = 200
(if using time * 100
)
This is perfect for making things move or change automatically, without setting any keyframes.
[value[0] + time * 100, value[1]]
// Moves layer to the right over time
// Adds 100 pixels every second to X (horizontal position)
// Keeps Y (vertical) position unchanged
time * 45
// Rotates the layer 45 degrees per second
// Change 45 to go faster or slower
Math.sin(time * 2) * 50 + 50
// Creates a looping sine wave
// Opacity goes between 0 and 100
// Sine outputs values from -1 to 1 → scaled to 0–100
[ value[0] + time * 10, value[1] + time * 10 ]
// Gradually increases both width and height
// Adds 10 units to X and Y scale every second
// Keeps the aspect ratio steady
Just copy the full expression code from the top of this page. Then Alt-click (or Option-click on Mac) the stopwatch on the property you want to animate. Paste the code into the editor and that's it. If you’re not sure which property to use, check the "Where to Apply" section above.
First, make sure your project is using the JavaScript engine (go to File > Project Settings > Expressions). Also double-check for missing characters, and see if the code requires parenting a layer. If so, there will be a comment in the code explaining what needs to be connected.
Take a look at the "How It Works" section on this page. It explains each part of the expression in plain language so you can understand how everything works together.
Yes, absolutely. Most expressions include easy-to-edit variables near the top and comments that guide you on what to change. You can also link sliders or checkboxes using Expression Controls if you want more control in the timeline.
Yes, you can use it on any property with a stopwatch. That includes Position, Scale, Opacity, and also effect settings like Blur or Tint.
In most cases, yes. These expressions are designed to adapt to your comp’s resolution and frame rate. If anything specific needs adjusting, it’ll be noted in the code or in the "How It Works" section.
Explore more expressions in this category