Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Moving keyframes timing sliders

  • Moving keyframes timing sliders

    Posted by Ayoub Gharafi on May 31, 2020 at 4:33 pm

    Hey guys I am working on a text animation , that I want to control its offset Timing , basically I have 2 keyframes from -100 to 100 and I want to move them like this k1 to the time t1=inPoint + Duration(Slider) and K2 To t2= t1+Holdtime

    I tried this expression By Dan Ebberts;
    witch works tremendously for T2 but I cant make the K1 Timing to be exactly at t1=inPoint + Duration(Slider)

    Please let me know if there’s any solution

    holdTime = effect("Intro")("Slider")*thisComp.frameDuration;
    k1 = 1; // 1st hold keyframe
    k2 = 2; // 2nd hold keyframe
    p =text.animator("Animator 1").selector("Range Selector 1").offset;
    t1 = p.key(k1).time;
    t2 = t1 + holdTime;
    if (time < t1)
    t = time
    else if (time < t2)
    t = linear(time,t1,t2,t1,p.key(k2).time)
    else
    t = p.key(k2).time + (time - t2);
    valueAtTime(t)

    Ayoub Gharafi replied 6 years, 4 months ago 2 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    May 31, 2020 at 5:44 pm

    I think it would be something like this:

    dur = effect(“Duration”)(“Slider”)*thisComp.frameDuration;
    holdTime = effect(“Hold Time”)(“Slider”)*thisComp.frameDuration;
    t1 = inPoint + dur;
    t2 = t1 + holdTime;
    t = linear(time,t1,t2,key(1).time,key(2).time);
    valueAtTime(t)

    Dan

  • Ayoub Gharafi

    May 31, 2020 at 6:03 pm

    Thanks So much Mr Dan It works perfectly , Also I want to thank you for the fast reply , you’re a legend keep it up

  • Ayoub Gharafi

    May 31, 2020 at 6:24 pm

    Hey man thanks again for saving me and please excuse me bothering you againg The expression works perfectly but it doesn’t give me the result I wanted so i went with 4 keyframes but this time
    The timing in the expression become like this :
    and I don’t think the linear expression will cut it this time

    t1 = inPoint;
    t2 = t1 + holdTime;
    t3 = t2+dur;
    t4 = t3+holdTime;

  • Dan Ebberts

    May 31, 2020 at 6:33 pm

    I think it would be like this:


    dur = effect("Duration")("Slider")*thisComp.frameDuration;
    holdTime = effect("Hold Time")("Slider")*thisComp.frameDuration;
    t1 = inPoint;
    t2 = t1 + holdTime;
    t3 = t2+dur;
    t4 = t3+holdTime;
    if (time < t2)
    t = linear(time,t1,t2,key(1).time,key(2).time)
    else if (time

    Dan

  • Ayoub Gharafi

    May 31, 2020 at 6:42 pm

    Man You’re a blessing can’t Thank you enough , you just made me want to keep learn about the possibilities in the world of expressions and script , big thanks

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