Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Change Y position of Shape Layer from Scale of Text Layer

  • Change Y position of Shape Layer from Scale of Text Layer

    Posted by Ambrose Salmini on March 22, 2015 at 5:29 pm

    So inside two text layers, first name and last name, each on top of each other… and a scale expression that adjusts the scale of them depending on how many characters are in the sourceText of each. That works fine. The only problem is that there is a bar (Shape Layer) that is underneath the text layers, so when they are scaled down, there is space between the last name and the bar. I want to be able to adjust the Y position of the bar layer depending on how much the text layers are scaled down.

    Thanks for the help.

    tempCounter = thisComp.layer("First Name").text.sourceText;
    s = tempCounter.length;

    var newScaleX;

    if (s<8)
    newScaleX = 100;
    else if (s>=8&&s<=10)
    newScaleX = 60;

    else if (s>=10&&s<=15)
    newScaleX = 40;
    else if (s>=16&&s<=20)
    newScaleX = 30;

    newScaleY=newScaleX;

    [newScaleX,newScaleY];

    Ambrose Salmini replied 11 years, 5 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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