-
Keeping 2 text layers center when the lengths change
I am trying to keep the first and last names center on screen as they change. I have first name (1) right justified and last name (2) left justified, placed in the center and attached to a null. My goal is to find an expression that will shift the null’s “x” position to re-center the names when they change. ie: from “jimmy smith” to “ed lichtenstein”. As you can tell the latter of the two names won’t be centered.
I found the expression below but doesn’t quite do the trick.
var w1= thisComp.layer(1).sourceRectAtTime().width;
var w2 = thisComp.layer(2).sourceRectAtTime().width;
[(thisComp.width-(w1+w2))/2,value[1]]Please help and THANK YOU!
