Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression to scale text based on character

  • Dan Ebberts

    October 27, 2023 at 4:50 pm

    You could try adding a Scale Animator to your text, set the Scale value to 50%, add an Expression Selector (and go ahead and remove the Range Selector), andset the Expression Selector’s Amount expression to this:

    txt = text.sourceText.value.replace(/\r/g,'');
    txt[textIndex-1] == "%" ? 100 : 0
  • Smet Kira

    October 29, 2023 at 4:12 am

    what mean this?

    (/\r/g,”)

  • Dan Ebberts

    October 29, 2023 at 6:41 am

    That means to remove any carriage returns from the text. Otherwise textIndex will get messed up if your text has multiple lines.

  • Christian Simpson

    December 5, 2023 at 9:56 pm

    Thank you Dan

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