Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions locking keyframes to markers ?

  • Raja kamaruzzaman Rc

    April 27, 2017 at 3:59 am

    Hi you still there? How do you tweak it exactly? I tried dan’s script but the marker only represent the second keyframe.. whenever I move the marker the animation speed change. I want the marker as a trigger, when the time needle go past the marker then the animation starts.

  • Dan Ebberts

    April 27, 2017 at 4:23 am

    Something like this maybe:


    L = thisComp.layer("Layer With Marker");
    if ((L.marker.numKeys > 0) && (numKeys > 0)){
    t1 = key(1).time;
    t = Math.max(time - L.marker.key(1).time,0);
    valueAtTime(t1 + t);
    }else
    value

    Dan

  • Raja kamaruzzaman Rc

    April 27, 2017 at 5:53 am

    Oh Yes! That works! thanks for such a fast reply!

    Have a Good Day Dan!

  • Raja kamaruzzaman Rc

    April 28, 2017 at 7:07 am

    Hi dan.. The script you’re giving is working fine.. but what if I have more than two keyframes? meaning I want the first 2 keyframes play as usual, but only the third and fourth keyframes will be triggered by that marker.

    I did this :

    L = thisComp.layer(“Layer With Marker”);
    if ((L.marker.numKeys > 0) && (numKeys > 0)){
    t1 = key(3).time;
    t = Math.max(time – L.marker.key(1).time,0);
    valueAtTime(t1 + t);
    }else
    value

    Key 1 and 2 does not play at all.

    Thanks!

Page 2 of 2

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy