Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions slider expression

  • Riccardo Sinti

    December 1, 2009 at 10:21 pm

    right now I’m just keyframing the slider to subtract 250 over ten frames then hold for two seconds then again subtract 250 over ten frames then hold for two seconds.
    I can put eases on the keyframes, what about in an expression.

    Thanks (I’ll learn this stuff one day)

    Thank You

  • Dan Ebberts

    December 1, 2009 at 10:32 pm

    Something like this:

    moveTime = 10; // frames
    holdTime = 2.0; // seconds
    amount = -250;

    segDur = moveTime*thisComp.frameDuration + holdTime;
    seg = Math.floor(time/segDur);
    t = time%(segDur);
    value + seg*amount + linear(t,0,moveTime*thisComp.frameDuration,0,amount)

    Dan

  • Riccardo Sinti

    December 2, 2009 at 7:01 pm

    Wow that works like a charm, thank you very much, but the code is very complex to me any chance you can expound on the different parts of it.
    1 question why is “moveTime = 10; // frames” in frames but “holdTime = 2.0; // seconds” is seconds how are frames distinguished from seconds?

    Thank You

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