Highlighted

I need to control keyframe by width of other text layer in after effects expressions

New Here ,
May 14, 2020

Copy link to clipboard

Copied

Hi I am trying to make a tempalte in Ae that slises in, so I need that the width of the rectangle will be the same of the text layer that above the box layer. but the rectangle have a slider effect so, i want to do something like this:

at 0 frames the slider is on 0, an after 30 fremes(1s) the slider will be the width of the text layer. 

and i want it to be like animation but i don't know how to do this, i am trying to do this for 3 days.

please awnser fast.

Topics

Expressions, How to

Views

285

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

I need to control keyframe by width of other text layer in after effects expressions

New Here ,
May 14, 2020

Copy link to clipboard

Copied

Hi I am trying to make a tempalte in Ae that slises in, so I need that the width of the rectangle will be the same of the text layer that above the box layer. but the rectangle have a slider effect so, i want to do something like this:

at 0 frames the slider is on 0, an after 30 fremes(1s) the slider will be the width of the text layer. 

and i want it to be like animation but i don't know how to do this, i am trying to do this for 3 days.

please awnser fast.

Topics

Expressions, How to

Views

286

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
May 14, 2020

Copy link to clipboard

Copied

Don't animate the path directly. Instead create a "Completion" or "Expansion" Slider with a percent range. this can then drive the actual rectangle. Something like this might work:

 

mComp=thisComp.layer("XYZ").effec("Completion")("Slider"); //layer with slider

mStart=0; //start frame
mEnd=30; //end frame

mSize=thisComp.layer("Text").sourceRectAtTime(framesToTime(mEnd));

mX=linear(mComp,0,100,0,mSize[0]);
mY=mSize[1];

[X,Y]

 

Mylenium

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
zivbeh LATEST
New Here ,
May 14, 2020

Copy link to clipboard

Copied

Thank you for your quick response!

but here 

mSize[0])

Ae doesn't know what '0' means.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...