Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Shapelayer (box) autosizes to multiple text layers

  • Shapelayer (box) autosizes to multiple text layers

    Posted by Bas V breugel on August 29, 2018 at 3:05 pm

    Hi,

    I have this design. Now I’m trying to have the red box autosize in width too the two clubs. So for example if the game would be PSV – ADO the red bar would be shorter. I guess shape position X axsis should scale up to X end from the last team. But not sure if that is possible?

    Who is Team1 vs Team2 has the sourcetext pulled from a json file.

    Allready got the position from the second team fixed to the first team.
    gap = 50;
    L = thisComp.layer("01_firstname");
    r = L.sourceRectAtTime(time,false);
    hisRight = L.position[0] + (r.left + r.width - L.anchorPoint[0])*L.scale[0]/100;
    r = sourceRectAtTime(time,false);
    myLeft = position[0] + (r.left - anchorPoint[0])*scale[0]/100;
    delta = hisRight - myLeft;
    value + delta + gap

    Bas V breugel replied 7 years, 8 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