ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Adding expressions to text animator

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Nikolay Arkhipov
Adding expressions to text animator
on Dec 15, 2019 at 2:08:46 pm
Last Edited By Nikolay Arkhipov on Dec 15, 2019 at 2:15:15 pm

Please, help me figure out what's wrong...
I need to animate text position using text animator. The idea is to make the text move from the left side of the rectangle to the center. So, if I define the position of this text manually (type a number), everything works fine. But, I need the position to be dependent on the rectangle size, so I use sourceRectAtTime expression, and it really gives me the very same value, BUT the text starts behave in a very strange way... and I can't understand why. Please, have a look at the screenshots. The 1st one is where I put the value manually (it shows -625 instead of -625.5, I have just mistaken in a number); and the 2nd screen is what happens when I define this value by an expression.

Screenshot 1


Screenshot 2


Return to posts index

Dan Ebberts
Re: Adding expressions to text animator
on Dec 15, 2019 at 6:05:17 pm

Try this:

L = thisComp.layer("Box");
r = L.sourceRectAtTime();
p = L.toComp([r.left + r.width/2,0]) - position;
[p[0],value[1]]


Dan



Return to posts index

Nikolay Arkhipov
Re: Adding expressions to text animator
on Dec 15, 2019 at 9:52:52 pm

Thanks for your reply, however it doesn't work...
I just reread the post, and maybe I haven't explained the interaction between layers correctly. So, there is the Text layer. Then there is a shape layer (Box), and it keeps the size of the text using sourceRectAtTime expression. Finally I'm going to apply an Alpha Matte and animate text revealing, that will go from the left side of the Box to its center, and become fully visible.

I tried to change thisComp.layer("Box") to thisLayer, and even to thisComp.layer("Text") / or SAMPLE TEXT as it is in the project), but it didn't work either... The contour moves, but the particular text stays still...



Return to posts index

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