Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Linking value of single keyframe to slider control while keeping values of other keyframes

  • Linking value of single keyframe to slider control while keeping values of other keyframes

    Posted by Shane Goudy on May 24, 2018 at 8:05 pm

    I’m working on a lower third for one of my companies brands.

    I have 3 keyframes for the X position of the right portion of the lower third.

    I need to link the 3rd keyframe to a slider control so the length of the lower third can be adjusted by my coworkers
    using the slider control value in Premiere (eventually this will be an essential graphics element).

    The other 2 keyframes need to retain their current values.

    Unfortunately, I don’t know expressions that well.

    I’ve tried using the key(index) and numKeys properties to no avail.

    I assume the end expression will be something like this:

    if ( key(index) = 3) {
    key(index).value = effect(“Slider Control”)(“Slider”);
    } else
    value

    I’ve seen similar posts like this in the forum but have yet to find something that addresses this specific issue.

    Thanks in advance for whatever help you provide!

    if ( key(index) = 3) {
    key(index).value = effect("Slider Control")("Slider");
    } else
    value

    Scott Mcgee replied 7 years, 11 months ago 3 Members · 2 Replies
  • 2 Replies
  • Chris Scalzo

    June 12, 2018 at 9:33 pm

    I just noticed this didn’t have any replies, so I’ll give it a go. I personally do not know of any way with an expression, to change values of a keyframe. However, if you have 2 fixed values you are transitioning between, then you want to transition to a third value off a slider you can do that with an expression like the linear() or smooth() functions. Hope this helps.

  • Scott Mcgee

    June 14, 2018 at 9:14 am

    Something like this is what you need where the values between the two keyframes can animate like Chris has suggested.

    if (numKeys > 1){
    t1 = key(2).time;
    t2 = key(3).time;
    v1 = transform.opacity;
    v2 = effect(“Slider Control”)(“Slider”)
    linear(time,t1,t2,v1,v2);
    }else
    value

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