Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions follow typing text

  • follow typing text

    Posted by Jonathan Reyes on February 20, 2009 at 3:31 pm

    I’m looking for an expression that automatically follows text as it’s typing on. Think of the blinking cursor effect (i think there’s a text preset called word processor that does something similar) except I want the cursor to be another layer instead of just a character offset. any suggestions would be great. thanks!

    Jonathan Reyes replied 17 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Filip Vandueren

    February 20, 2009 at 4:27 pm

    Impossible, unless you limit your design choices:

    there’s no way of knowing what pixel-position the cursor would be at, unless you’re using a fixed-width, fixed height 1 font-size text.
    Using 60px Andale Mono in a square pixels comp, gave me characters that were always 36 px apart.

    So this worked for me:

    l=thisComp.layer("fixed width text");
    i=thisComp.layer("fixed width text").text.animator("Animator 1").selector("Range Selector 1").end-1;

    c=i;

    l.position + [i*36,0]

    But then it’s very tricky to know on what line of a multi-line text the current character is on.

    Do you need a special shape for the cursor ? Why can’t it be done with a variant of the word-processor effect ?

  • Jonathan Reyes

    February 20, 2009 at 5:17 pm

    hmmm…ok thanks Filip, that’s good to know. I appreciate the code. The cursor will actually be an animated icon. I can do the movement by hand, but the animation will be used for episodic content, as such, will need to be updated each week by people not too familiar with after effects. I’m basically just setting up a template for them where they can type in the text and hit the render button.

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