ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expression to keep object scaling from a specific point

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dylan Hay
Expression to keep object scaling from a specific point
on Mar 2, 2019 at 1:24:14 am

I'm trying to get the right side black bar to stay attached to the right side of the white bar even after the text within the bar has been adjusted.

Currently this black bar is scaling in size depending on the text and I need it to continue doing so but in a way that it dosn't mess with the animation of the black bar appearing from the right to left.

I have little to no knowledge of expressions in after effects but I can try and provide more information if needed.

Example: The Scaling with the default text used


Example: The Scaling with other text used


As you can see from the example above the Black bar has scaled correctly but is moving from the edge of the white bar. All anchor points are also at the top left of the white bar.

L=thisComp.layer("Names");
X=L.sourceRectAtTime().width;
Y=L.sourceRectAtTime().height;
P=thisComp.layer("Control").effect("Slider Control")("Slider");
[X,Y]+[P,P]


Return to posts index

Arthur Hakhverdian
Re: Expression to keep object scaling from a specific point
on Mar 21, 2019 at 10:15:24 am

Sorry, Dylan but I already hate what you're trying to do here. 😉 Far too many layers to accomplish something that requires at MOST two and maybe even just one. See this here? https://drive.google.com/file/d/1e3GLat97akYc_Upgz2ZFnnLJKwP-yPux/
Even if your desired end result slightly differs from what's in that link, it should probably serve as an example of how stuff like this should REALLY be built.

At the very least a good place to start would be to make both the dark grey and the white rectangles sub-elements of ONE shape layer. The parallel reveal of the text, if it's only to be horizontal, can be accomplished via a properly rigged Linear Wipe effect.
Or, better yet, have a look at what I did and try adopting that.


Return to posts index

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