Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Y position controled by marks

  • Y position controled by marks

    Posted by Marcelo Cabral on September 24, 2017 at 6:05 pm

    Hi. I need to make final credits animation project, but they have to be showed step by step. What basically I need is an expression which read several marks ( a variable quantity of marks) in a layer named “control” and moves a 3D null in the “y” position (100 pixels up) every time the indicator pass over a mark of this layer. The movement has to be an easy movement. In other words, the expression has to move the null 100 pixels up (“y” position) with the first layer mark and when it passes over the second mark has to move the null another 100 pixels more in the same direction and the same with the rest of the marks, always with an easy movement. Thank you for your help in advance.

    Marcelo Cabral replied 8 years, 7 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    September 24, 2017 at 6:39 pm

    Something like this maybe:


    m = thisComp.layer("control").marker;
    moveDur = .25;
    y = 0;
    if (m.numKeys > 0){
    n = m.nearestKey(time).index;
    if (time < m.key(n).time) n--;
    if (n > 0){
    t = time - m.key(n).time;
    y = ease(t,0,moveDur,(n-1)*100,n*100);
    }
    }
    value - [0,y];

    Dan

  • Marcelo Cabral

    September 24, 2017 at 7:42 pm

    Hi, Dan. Amazing response as always.
    It works awesome!! is there some way to make the movements even smoother? I really appreciate your help. Big thanks!

  • Marcelo Cabral

    September 24, 2017 at 7:46 pm

    If it is possible, a little easy in and easy out or bounce effect between movements will be great. Thank you again.

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