ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

tracking a shape to follow along with animating text (similar to "Word Processor")

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ryan Powell
tracking a shape to follow along with animating text (similar to "Word Processor")
on Jan 2, 2019 at 9:39:40 pm

Hi - I want to create something similar to the Word Processor text animation where a "computer cursor" tracks along as my text layer reveals each character, except that I want to track a custom shape layer as my cursor rather than a unicode character from the font. Is this possible to do with an expression? I am working with two, sometimes three lines of text, and for now I have to keyframe the position of the shape for each new character that animates on. I would like to automate this because I have multiple variations of text to do this to.

Can I parent the anchor point of the shape layer to the "Anchor Point Grouping" of each character in the text layer? Is there an expression that would help do this?

Thanks for your help!!!


Return to posts index

Kalleheikki Kannisto
Re: tracking a shape to follow along with animating text (similar to "Word Processor")
on Jan 3, 2019 at 5:19:11 pm

Line breaks pose a bit of a challenge, but it can be done.

What I would do is write the text with the point text tool and use line return for the line breaks. That way you can find the line breaks with an expression.

I'd use a slider for advancing the cursor (by letter index).

Then I would have another, hidden, text layer with the same character settings as the text you are typing. The source text of this layer would be derived by an expression from the original source text and the slider value in such a way that only the last line of text would be there. Then you can get the horizontal location for the cursor with sourceRectAtTime(), using the width of the text. The vertical location would be based on the number of line breaks passed at the current index.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Ryan Powell
Re: tracking a shape to follow along with animating text (similar to "Word Processor")
on Jan 3, 2019 at 10:42:05 pm

Thanks for your reply Kalleheikki. What expression would I use to find the line breaks? I'm not very familiar with this level of expression scripting. Thanks again!


Return to posts index


Kalleheikki Kannisto
Re: tracking a shape to follow along with animating text (similar to "Word Processor")
on Jan 4, 2019 at 7:37:55 am

As I recall, you can return an array of lines with string.split("\R") or string.split("\n").

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]