After Effects Expression: How to Trigger Keyframes with Layer Markers

Learn how to trigger keyframes with layer markers in this After Effects Tutorial, using a very useful copy & paste expression.

Copy and paste the expression below:

// motioncaddy.com

L= thisLayer;

n = 0;

if (L.marker.numKeys > 0){

n = L.marker.nearestKey(time).index;

if (L.marker.key(n).time > time){

n--;

}

}if (n == 0){

valueAtTime(0);

}else{

t = time - L.marker.key(n).time;

valueAtTime(t)

}

Previous
Previous

How to Create a Glitch in After Effects

Next
Next

Control Multiple Layers Using Sliders