Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Text: make “start” value change over “text length” frames

  • Text: make “start” value change over “text length” frames

    Posted by Alekos Mazzolotti on June 10, 2020 at 10:00 pm

    I use a lot the “typewriter” effect in AE and, as a personal standard, when setting the distance between the 2 keyframes that make the “start” property go from 0% to 100%, I simply count the characters in the word and apply this quantity manually, in frames, so that the letters appear 1/frame.

    I was wondering… Is there a way to use an expression to make this property go from 0% to 100% across a number os frames equal to the text length?

    Alekos Mazzolotti replied 5 years, 12 months ago 3 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    June 11, 2020 at 12:28 am

    Assuming you leave Units set to Percentage, something like this should work:

    n = text.sourceText.value.length;
    t = time – inPoint;
    (t/framesToTime(n))*100

    Dan

  • Alekos Mazzolotti

    June 11, 2020 at 2:12 pm

    Beautiful! Works as clock!!

    Just out of curiosity, what if I were to apply the same concept to the “offset” property, in ramp up mode, that, instead of going from 0 to 100, must be set to variate from -100 to +100?

    Thanks a huge lot for your help!

  • Ranveer Singh

    June 12, 2020 at 8:29 am

    Add this expression to the offset property.
    Remove the keyframes from start. Set it to 0

    I used this expression in After Effects 2020.

    txt=text.sourceText;
    t=inPoint;
    linear(time,t,t+framesToTime(txt.length),-100,100);

  • Alekos Mazzolotti

    June 12, 2020 at 3:34 pm

    Wonderful!

    One last question: how do I like your answer a thousand times? ahahahah

    Thanks a huge lot, friend.

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