Moderators: Disciple, zlovatt

Topic Author
Posts: 1
Joined: Thu Apr 09, 2015 8:04 am

keyframes control with layer markers

Thu Apr 09, 2015 8:29 am


I have an animation of a line that has two sets of keyframes of two different properties in CS4.

Basically a line gets generated in the first phase then it gets cleared out in the second phase.

This is done using two slider controls that act on the horizontal size of two rectangles and using merge paths (using the second rectangle as a matte for the first to clear it out)

I've put two layer markers on my layer hoping to link the keyframes to each of them.

Then I have found this script on the web and I put it on the first property :

L= thisComp.layer("ShapeLayer");

n = 0;

if (L.marker.numKeys > 0){

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

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



}if (n == 0){



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



This indeed lets me move the whole animation with the layermarker (which is very good) but I can't find a way to link the second set of keyframes to do the output.

I will add the project file

Please help!

AE CS4 project file
(16.67 KiB) Downloaded 255 times
Posts: 4
Joined: Fri Mar 06, 2015 6:33 am

Re: keyframes control with layer markers

Sun May 03, 2015 7:35 pm

i think your problem is to understand what this block of code does, please check the last bullet point of this topic: ... f-the-box/

with if/else condition you can define the 2 states you want to execute

Who is online

Users browsing this forum: No registered users and 2 guests