Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Lock position of layer to text length

  • Lock position of layer to text length

    Posted by Taso Mastorakis on January 19, 2018 at 4:13 pm

    Hey everyone, I’m sort of a novice with expressions and I found this one from Dan that almost does what I need it to:

    gap = 10;
    L = thisComp.layer(“text”);
    rect = L.sourceRectAtTime(time,false);
    x = L.toComp([rect.left+rect.width,0])[0];
    [x+gap+width/2,value[1]]

    It works great if the text layer is left justified moving to the right. Just wondering how I can reverse this to be right justified and have the secondary layer move to the left. I’ve tried switching a number of the attributes but nothing seems to work. Thanks in advance.

    Taso Mastorakis replied 8 years, 3 months ago 1 Member · 1 Reply
  • 1 Reply

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