Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression to keep anchor point in the bottom center

  • Expression to keep anchor point in the bottom center

    Posted by Marina Cotrim on January 5, 2017 at 3:37 pm

    Hi everyone,

    I’m creating a template that uses 3 layers of text and calculates its combined heights to define the height of a shape. This part I could achieve with a little experimenting.
    The position of the text layers 02 and 03 are linked to the position of text layer 01.

    The problem is the anchor point of text layers changes its relative position when I change the source text.
    Let’s say I type “Games” and put the anchor point in the lower bottom. If after that I change the text to “games”, the anchor point’s position won’t be the lower bottom anymore.
    I need it to dynamically change accordingly to the text that is typed.

    Is there any way to achieve this?

    Thank you very much!

    Marina Cotrim replied 9 years, 4 months ago 1 Member · 1 Reply
  • 1 Reply
  • Marina Cotrim

    January 5, 2017 at 4:11 pm

    I found a solution!

    Youtube user “Egg nof” posted this.

    It worked very well for me. Hope it helps someone else!

    boxTop = this.sourceRectAtTime().top; // Position of top of text box
    boxHeight = this.sourceRectAtTime().height; //Height of textbox

    //Offset anchor down from boxTop using half the height of the box
    [value[0], boxTop + boxHeight/2 ];

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