Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Source text display set amount of characters + animate position

  • Source text display set amount of characters + animate position

  • John Burgess

    September 20, 2021 at 4:09 pm

    Hi,

    I’m trying to limit the amount of characters displayed in Source Text to always 9 + auto animate the position from right to left (position needs to jump from a single character at a time) like the below example ideally with some kind of speed control.

    Would normally use an opacity range selector or a mask + position loopOut but both of these methods are breaking when parented and in 3D space.

    Is this possible to achieve with an expression?

    Thanks

  • Andrei Popa

    September 20, 2021 at 4:35 pm

    Try something like this. dur is duration in frames, charNo is how many characters you want at a time.

    charNo = 9;
    dur = 3;
    totalChars = text.sourceText.length;
    txt = text.sourceText;
    st = Math.floor(timeToFrames(time)/dur)%totalChars;
    t1 = txt.substr(st,Math.min(charNo, totalChars-st));
    t2 = txt.substr(0,Math.max(0, st+charNo - totalChars));
    t1+t2
  • John Burgess

    September 20, 2021 at 4:56 pm

    This works perfect, thank you so much Andrei

Viewing 1 - 3 of 3 posts

Log in to reply.

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