Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions measure the number of letters in the text layer

  • measure the number of letters in the text layer

    Posted by Ilya Yaki on October 18, 2013 at 7:10 pm

    hello, please tell me, is it possible to measure the number of letters in the text, for text layer and transmit this information to the parameter on another layer, for example to change the size of the underlying layer, depending on the number of letters and, accordingly, are long lines of text

    Ilya Yaki replied 12 years, 10 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    October 18, 2013 at 9:00 pm

    Like this:

    numLetters = thisComp.layer(“your text layer”).text.sourceText.length;

    Dan

  • Ilya Yaki

    October 19, 2013 at 1:21 am

    oh yeah! what was needed, very big thanks .

    If anyone is interested here is my version of the code is to die under the text

    numLetters = thisComp.layer(“TExt”).text.sourceText.length;
    [numLetters*effect(“Slider Control”)(“Slider”),value[1]]

    effect “Slider Control” is multiplayer for fat letters

    I’m sorry Dan , can you tell me where I can find all the text options that can be used in AE expressions ? i m cant find this in Help docs https://help.adobe.com/en_US/aftereffects/cs/using/WS3878526689cb91655866c1103906c6dea-7a0ca.html

  • Dan Ebberts

    October 19, 2013 at 2:36 am

    I think what you want is all the string functions and attributes that are part of core JavaScript. In JavaScript, strings are treated as an array of characters and, as for any array, .length gives you the number of elements (letters, in this case). So you should probably just get your hands on a good JavaScript reference. I like JavaScript the Definitive Guide, but there are others.

    Dan

  • Ilya Yaki

    October 22, 2013 at 10:33 am

    thanks

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