ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Object isn't attaching to the anchor point

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dylan Hay
Object isn't attaching to the anchor point
on Mar 2, 2019 at 1:48:28 am

Im trying to make a template of this animation but the black bar isn't reacting with the anchor point in the way id like it to and i dont know how to fix it or make it react in the way id like.

Example: Using Default Text

Example: Using Shorter Text

I need an expression etc. that would adjust the anchor point depending on the length of the text so that the right side of the black bar is perfectly touching the left of the white bar.

The code posted is used within the Rectangle path of the black bar which scales it to fit the text.

P=thisComp.layer("Control").effect("Slider Control")("Slider");

Return to posts index

Andrei Popa
Re: Object isn't attaching to the anchor point
on Mar 2, 2019 at 6:41:59 am

What i would do would be attaching this to the anchor point of the rectangle shape

temp = thisLayer("Contents")("Rectangle 1")("Contents")("Rectangle Path 1")("Size")[0]/2;
[temp, value[1]]

This way, it is fixed on the right side. Then just move it near the white line and it should stay there.

My Envato portfolio.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 All Rights Reserved