Forums › Adobe After Effects Expressions › Trim Path Expression question
Trim Path Expression question
Stephen Schleicher
March 24, 2020 at 7:29 pmI have two lines of text.
The top line (L1) resizes and has a box (shape layer) around it that resizes as well using an expression.
The box also has a stroke around it using the Trim Path. The Path has an end value that is a percentage of the size (width) of the second line of text’s width (L2).What I would like to do is have the end value of the Trim Path of L1 maintain a set distance from the width of the second line of text (L2), even when that second line of text grows or shrinks.
I feel like I’m almost there, but for some reason, I am missing an important part.
In the example below the end value of the trim path is 70% and looks great until I start changing the width of either of the two layers, and everything falls apart.
L2=thisComp.layer("TITLE BOX").content("Rectangle 1").content("Rectangle Path 1").size[0];
L1=content("Rectangle 1").content("Rectangle Path 1").size[0];
Difference=L2/L1;
percentage=Difference*100;
End=percentage
Andrei Popa
March 26, 2020 at 7:44 amCould you post a print screen of the situation?
Andrei
My Envato portfolio.
Log in to reply.