Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Center two dynamic text columns in relation to each other

  • Center two dynamic text columns in relation to each other

    Posted by Niels b Nielsen on March 5, 2018 at 10:07 am

    I have a composition with two dynamic text columns. I want the two columns to be centered in relation to each other. The length of the columns vary accoring to user input.

    I’m calculating the length of each text column with sourceRectAtTime, and the total width of the comp is 1920. How do I center each column in relation to each other?

    Niels b Nielsen replied 8 years, 4 months ago 1 Member · 1 Reply
  • 1 Reply
  • Niels b Nielsen

    March 5, 2018 at 7:35 pm

    Found my solution through trial and error. It helped me to imagine that the horisontal spacing left not used by the width of column 1 and column 2 should be split equal into 3 (space before first column, space between both columns and space after second column).

    For reference this is what I did for the X Position.

    Column 1 position:
    (1920-(c1w+c2w))/3

    Column 2 position:
    (1920-(c1w+c2w))/3*2 +c1w

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