ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Position property expression for animated text.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
liviu ispasoiu
Position property expression for animated text.
on May 23, 2019 at 7:41:57 pm
Last Edited By liviu ispasoiu on May 24, 2019 at 10:04:00 am

Hi, I´m struggling with an expression for a text animation and I need some help.
I created a mask where the size is automatically given by the length of the text. I used a range selector to animate the position of the characters and in the first phase, I want it to be automatically positioned to the left for a distance equal to the length of the text /mask, symmetrical in some way. For any text adjustment, it must work symmetrically against the mask “position”. Hope it makes sense. Any ideas?





this is the expression I used
Rectangle Path-> Size
var titleLayer = thisComp.layer("Lorem ipsum dolor");
var boxWidth = titleLayer.sourceRectAtTime(0,true).width;
var boxHeight = titleLayer.sourceRectAtTime(0,time).height;
[boxWidth, boxHeight]


Rectangle Path - >Position
var titleLayer = thisComp.layer("Lorem ipsum dolor");
var boxWidth = titleLayer.sourceRectAtTime(0,true).width/2;
var boxHeight = titleLayer.sourceRectAtTime(0,true).height/2;
var boxX = titleLayer.sourceRectAtTime(0,true).left;
var boxY = titleLayer.sourceRectAtTime(0,true).top;
[boxWidth + boxX, boxHeight + boxY]


Transform Rectangle -> Anchor Point
(linked to the position property of the characters in Range Selector Animator)
thisComp.layer(“Lorem ipsum dolor”).text.animator("Animator 1").property.position;

Position in Range Selector Animation
(???) here I got stuck



Thank you!


Return to posts index

liviu ispasoiu
Re: Position property expression for animated text.
on May 25, 2019 at 6:55:20 pm

Actually, I solved it. For the position property in range selector animation I used:
var boxWidth = thisLayer.sourceRectAtTime(time).width;
[-boxWidth,0]

and no need to link the Anchor Point to the position property of the characters in Range Selector Animator.
The only thing I found there is a small offset position of characters like A, V.. vs. B, L, P .... but that's another story. Anyway, thank you!


Return to posts index

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