Forums › Adobe After Effects Expressions › Changing text position by determining character length
Changing text position by determining character length
Tonmoy Moves
February 23, 2021 at 3:05 amHi, I am trying to create a custom lower-third and export it as a mogrt. It’s a simple name tag in a simple format – [Title + First Name] [Last Name] [Affiliations]. The reason why they have to be separate is because they all have some unique formatting style. So my question is: How do I dynamically change the position of the 2nd and 3rd text boxes based on the character length of the 1st box?
Filip Vandueren
February 24, 2021 at 10:12 pmThe easiest way is to parent the 3rd to the 2nd and the 2nd to the first word.
Then give 2nd and 3rd words position properties both this expression:
[20,0] + [parent.sourceRectAtTime().width,0];
20 in this case is the horizontal margin between the words.
Log in to reply.