ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Trim Path Expression question

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Stephen Schleicher
Trim Path Expression question
on Mar 24, 2020 at 7:29:05 pm

I 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


Return to posts index

Andrei Popa
Re: Trim Path Expression question
on Mar 26, 2020 at 7:44:25 am

Could you post a print screen of the situation?

Andrei
My Envato portfolio.


Return to posts index

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