Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Length of lower third box determined by multiple lines of copy

  • Length of lower third box determined by multiple lines of copy

    Posted by Sean Platt on April 25, 2023 at 9:46 pm

    Forgive me for the simple question regarding if/then statements. Rookie here when it comes to expressions.

    I have a lower third box with 3 lines of copy. Using layer controls and point controls, I am able to adjust the width of the box (“Back Charcoal” layer) based on either line 1 or line 2 – whichever line is longest. But I am unable to figure out how to write the expression to account for line 3 (if that were the longest) as well.

    In the attached screenshot, the variable for “T” is the first line of copy, the variable for “T2” is for the 2nd line of copy, and the variable “T3” is the third line.

    Thank you for your help!

    Brie Clayton replied 1 year, 2 months ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    April 25, 2023 at 10:04 pm

    I think you just need to replace the last line with this (not tested though):

    tMax = Math.max(t.width,t2.width,t3.width);
  • Sean Platt

    April 26, 2023 at 1:45 pm

    That worked, Dan, (and it sent me down a trail to look more into Math.max). Thank you so much!

  • Brie Clayton

    April 27, 2023 at 2:24 pm

    Thank you Dan!

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