Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression selector

  • Expression selector

    Posted by Edward Clayton on February 22, 2023 at 12:01 am

    I’m having a hard time writing expression selector expressions as there doesn’t seem to be much documentation out there.

    If it is possible, how could I target on characters by their index that have changed in the last frame. And I want to combine this with a linear function to change the influence so that if they have changed 1 frame ago = 100… 10 frames ago = 10, 11 frames ago = 0.

    Dan Ebberts replied 3 years, 2 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    February 22, 2023 at 1:31 am

    Here’s a simple example that will need more complexity if there are multiple lines, or if the number of characters changes:

    curChar = text.sourceText.value[textIndex-1];
    val = 100;
    t = time - thisComp.frameDuration;
    while (val > 0){
    prevChar = text.sourceText.valueAtTime(t)[textIndex-1];
    if (curChar != prevChar) break;
    t -= thisComp.frameDuration;
    val -= 10;
    }
    val

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