Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Trim Path Expression question

  • Trim Path Expression question

  • Stephen Schleicher

    March 24, 2020 at 7:29 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

  • Andrei Popa

    March 26, 2020 at 7:44 am

    Could you post a print screen of the situation?

    Andrei
    My Envato portfolio.

Viewing 1 - 2 of 2 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy