Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Reverse Expression

  • Reverse Expression

    Posted by Scott Smith on June 25, 2015 at 1:57 pm

    Hi, ihave the following expression assigned to a text layer

    selectorValue * textIndex/textTotal
    delay = .025;
    myDelay = delay*textIndex;
    t = (time – inPoint) – myDelay;
    if (t >= 0){
    freq =2;
    amplitude = 100;
    decay = 10.0;
    s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
    [s,s]
    }else{
    value
    }

    This causes each letter to grow one after the other from left to right, it also adds a inertial bounce.

    My question is how to I get this to work from right to left instead? I basically need to somehow reverse the selector value order?

    Thanks in advance

    selectorValue * textIndex/textTotal
    delay = .025;
    myDelay = delay*textIndex;
    t = (time - inPoint) - myDelay;
    if (t >= 0){
    freq =2;
    amplitude = 100;
    decay = 10.0;
    s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
    [s,s]
    }else{
    value
    }

    Dan Ebberts replied 11 years, 1 month ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    June 25, 2015 at 4:40 pm

    Like this probably:


    idx = textTotal - textIndex + 1;
    selectorValue * idx/textTotal
    delay = .025;
    myDelay = delay*idx;
    t = (time - inPoint) - myDelay;
    if (t >= 0){
    freq =2;
    amplitude = 100;
    decay = 10.0;
    s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
    [s,s]
    }else{
    value
    }

    Dan

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