Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions scroll text layer in segments

  • scroll text layer in segments

    Posted by Shai Benshoshan on June 27, 2018 at 11:33 am

    I am trying to create a scroll via expression.
    the scroll action should be divided to segments: example: move 400px up, stop for 2 sec, then move 400px again, stop… the last block of text should also wait for 2 sec and move on.
    I need to: 1.move, 2. update target positions, 3.move again
    I thought using the for loop, with ease interpolation, but i can get it to move only once :

    durMov = 5;
    distance = 400
    endPos = 2000;
    var currentPos;
    var finalPos;
    for (i=5;position[1] 0; i–){

    currentPos = position[1];
    nextPos = currentPos+distance;

    ease(time,0,durMov,currentPos,nextPos );
    };

    Thank You ;

    durMov = 5;
    distance = 400
    endPos = 2000;
    var currentPos;
    var finalPos;
    for (i=5;position[1] 0; i--){

    currentPos = position[1];
    nextPos = currentPos+distance;

    ease(time,0,durMov,currentPos,nextPos );
    };

    Shai Benshoshan replied 7 years, 10 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    June 27, 2018 at 1:09 pm

    I’m not sure I understand everything you’re trying to do, but I think it will look something like this:

    moveDur = 5;
    waitDur = 2;
    moveAmt = 400;
    t = time – inPoint;
    segDur = moveDur+waitDur;
    seg = Math.floor(t/segDur);
    tSeg = t%segDur;
    yOffset = seg*moveAmt + ease(tSeg,0,moveDur,0,moveAmt);
    value – [0,yOffset]

    Dan

  • Shai Benshoshan

    June 27, 2018 at 1:46 pm

    thank you dan, it is exactly what I needed!
    all the best to you 🙂

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