Creative Communities of the World Forums

The peer to peer support community for media production professionals.

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

  • Source text display set amount of characters + animate position

    Posted by John Burgess on September 20, 2021 at 4:09 pm


    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?


    John Burgess replied 2 years, 10 months ago 2 Members · 2 Replies
  • 2 Replies
  • 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));
  • John Burgess

    September 20, 2021 at 4:56 pm

    This works perfect, thank you so much Andrei

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