ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Shapelayer (box) autosizes to multiple text layers

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Bas v Breugel
Shapelayer (box) autosizes to multiple text layers
on Aug 29, 2018 at 3:05:07 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




Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]