Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Problem with text animator by character and two lines sourceText

  • Problem with text animator by character and two lines sourceText

    Posted by Sebastien Bruzzo on November 10, 2018 at 5:22 pm

    Hello everyone !

    I’m confronted with a tricky text animator situation :

    There is a sentence made of two parts “Part01” (“Hello Sir”) and “Part02” (“How are you ?”) both in the same line.
    These two parts can be different, so the number of characters in each part could be different.
    I took Part01 from a text layer using sourceText, same for Part02 from another text layer, and added the two parts in a third text layer, as follows
    TextPart01 = thisComp.layer("SOURCE_TEXT ligne 01").text.sourceText;
    TextPart02 = " " + thisComp.layer("SOURCE_TEXT ligne 02").text.sourceText;
    TextPart01+TextPart02

    In this third text layer I want to drive the opacity for each character of Part02 – and only Part02 – with a text animator.
    So we have :
    – “Hello Sir How are you ?” is the text resulting from Part01 + Part02. Total : 9 + 14 = 38 characters
    – “Hello Sir” is already visible, then Part02 is revealed with the text animator.

    I’m looking for the expression in the Start value of the Range Selector that would always start at the point where Part02 starts. And works whatever lenghts are Part01 and Part02 of the desired sentence. Not sure I’m making myself clear :))

    Thank you everyone for your help !

    Kalleheikki Kannisto replied 7 years, 6 months ago 2 Members · 1 Reply
  • 1 Reply
  • Kalleheikki Kannisto

    November 11, 2018 at 9:37 am

    I’d guess it would be like this:
    L1 = TextPart01.length;
    L2 = TextPart02.length;
    L = L1+L2;
    startPos = 100/L*L1

    Kalleheikki Kannisto
    Senior Graphic Designer

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