Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Use a slider to change a certain keyframe’s value

  • Use a slider to change a certain keyframe’s value

    Posted by Matias Andersen on January 23, 2018 at 7:08 pm

    I’m trying to do some simple position animation with keyframes, but I want to be able to change the 2nd keyframe’s X & Y values with a slider.
    I haven’t been able to find an expression that does that, and I have little to no skills in coding, I only know the basics.

    Just to clarify, I only want the 2nd keyframe’s values to change, I don’t want the expression to change the position of the layer itself, since I still want the keyframe animation.

    I found an expression here which kind of does what I need, exept that it doesn’t keep the keyframe’s animation.

    valueControl = thisComp.layer("Adjustment Layer 2").effect("Slider Control")("Slider")
    valueKey = 2

    n = 0;
    if (numKeys > 0) {
    n = nearestKey(time).index;
    if (key(n).time > time) n--;
    };

    if(n==valueKey){
    value-valueControl} else value;

    Matias Andersen replied 8 years, 6 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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