After Effects Tip: How To Use Markers To Trigger Animation Without Keyframes

In this post I will show you how to use markers to trigger animation without keyframes in After Effects. So let’s dive right in!

Here we are in After Effects. As you can see, I have an IN POSITION


Out Position in After Effects

The IN and OUT POSITION determine the beginning position and end position of my animation. So it doesn’t matter where we place the IN or OUT POSITION. It will always go from in to out.

Moving from In to Out Position in After Effects

Then we have two markers in our timeline.

Two markers in After Effects timeline

The first marker determines the beginning animation. That’s why it’s called start and the second marker triggers the end animation.

So if I move my time indicator in the timeline and as soon as I pass my first marker, that’s what’s going to trigger my animation. It is going to play out my animation until I get to the end marker.

It doesn’t matter where we place the start and end markers. It will always trigger the animation. Let me show you how to set it all up.

Alright, so the first thing I’m going to do is select my logo and hit P to reveal the position property.

Position Keyboard Shortcut in After Effects

As you can see we have our old expression.

Old Expressions in After Effects

So I’m going to get rid of it by holding ALT+Left Click on PC or OPT+Left Click on a Mac.

keyboard shortcut to get rid of old expressions in after effects

Then to create a new one, we need to again ALT+Left Click on PC or OPT+Left Click on a Mac on the stopwatch icon. You should see a white text box appear in the timeline.

Click on the stopwatch icon

I’m going to set some variables inside of the white text box. The first one is going to be startMarker and we are going to give it a value.

So smartMarker is going to be thisComp.marker.key(). In the () we are going to determine the index. The 1st one is going to be START and the 2nd is going to be END. So I am going to say 1 for START.

Here is what it should look like: startMarker = thisComp.maker.key(1).

startMarket in After Effects

However, that’s not enough. We have to determine what  we want from that. Do we want the value, the duration? What is it? So I am going to say that I want the time from that marker startMarker = thisComp.maker.key(1).time;

startMarket position after effects

In other words, I want to know where it is located on the timeline. That is going to be important later on.

Next, I am going to select my text and copy it with the copy keyboard shortcut CTRL+C on a PC or CMD+C on a Mac.

Copy keyboard shortcut After Effects

Then hit enter on the keyboard and paste the text with the paste keyboard shortcut CTRL+V on a PC or CMD+V on a Mac like so:

Paste Keyboard Shortcut in After Effects

I’m going to change the startMarker to endMarker.

endMarker After Effects

The end marker is going to be the second one. I hope it is making sense so far.

Change the index in After Effects
Next, I’m going to select my IN and OUT POSITION and hit P to reveal the position property.

Position Property Keyboard shortcut in After Effects

So now I’m going to determine some variables for position. I’m going say xInPosition you are going to be the xInPosition like so: xInPosition = thisComp.layer(“IN POSITION”).transform.position[0];

xInPosition in After Effects
Next, I’m going say yInPosition, you are going to be thisComp.layer(“IN POSITION”).transform.position[1];

Then I’m going to do xOutPosition and I’m going to say you are going to be thisComp.layer(“OUT POSITION”).transform.position[0];

xOutPosition in After Effects

Then I’m going to do yOutPosition and it’s going to be the Y property like so:

yOutPosition in After Effects

I think this is it as far as variables go. Now we’re going to do some expressions. I’m going to type X = and then I’m going to go to expression helper -> interpolation and I’m going to select this ease expression.

Ease expressions in After Effects Interpolation

I’m going to click on that then I’ll add the semicolon at the end like so:

Ease expression in After Effects

Inside this ease expression I’m going to change from T to time like so: x = ease(time, tMin, tMax, value1, value2);

I can then set tMin and tMax from 0 to 1 second, but instead I am going to call out my variable. I am going to say x = ease(time, startMarker, endMarker, value1, value2);

So it is going to start at the beginning of my marker and end at the end of my marker.

Next, I need to determine the value1 and value2. So what value do I want it to go from?

In this case we are on the x-axis. So I am going to say xInPosition is going to be my starting position and xOutPosition is going to be my end position like so:

x = ease(time, startMarker, endMarker, xInPosition, xOutPosition);

Now lets copy our x = ease(time, startMarker, endMarker, xInPosition, xOutPosition);

hit enter and paste it below but this time change the x to y like so:

y = ease(time, startMarker, endMarker, yInPosition, yOutPosition);

y position After Effects And after that I’ll just determine that in my square brackets like so: [x, y]

x and y after effects

and that should make it all work!

startMarket Adobe After EffectsYou can download the project file for this tip by filling out the form below.

About the author:

Sergei Prokhnevskiy

Sergei Prokhnevskiy is a Charlotte, NC based motion graphics designer, an online tutor, an entrepreneur, and Adobe MAX Master Speaker. Sergei is known for his quick and practical After Effects tips and tricks on YouTube, where he generated well over 6 million views on his tutorials. He has authored an online video course on After Effects Expressions and developed scripts for After Effects. He is also a former senior motion graphics designer at Fox Sports where he worked on graphics for NFL, Super Bowl, MLB, World Series, College Football, NASCAR, Women’s World Cup, and NASCAR Race Hub. He is very passionate about learning and teaching others.


Over 100,000 downloads & counting!

These 5 tools will seriously speed up your workflow and save you hours of wasted time. More than that, they could be the difference between being able to complete a project on time or not!