ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Control scale keyframes with slider

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ryan Hagen
Control scale keyframes with slider
on Dec 5, 2017 at 6:28:59 pm

This is the expression i'm using, and it's not working currently. I have 4 keyframes total, and i'm unsure if I needed to add that in the expression as well(unsure how or where).
To further clarify, I have a box, animated on it's X, it animates on, holds for a certain period of time, and then animates back to zero. I want to give the end user the ability to change the box's scale with the slider. So if the scale is 100, if they set it to 20 on the slider, it would be 120, without having to adjust the keyframes. I hope that makes sense. Thanks for any help.

if (numKeys > 1){
t1 = key(1).time;
t2 = key(2).time;
v1 = 0;
v2 = value + thisComp.layer("Info_box_ct").effect("infoBox_length")("Slider")
linear(time,t1,t2,v1,v2);
}else
value


Return to posts index

Andrei Popa
Re: Control scale keyframes with slider
on Dec 6, 2017 at 9:05:39 am

The way i understand it is . You have a box, animate its x scale 0->100, hold at 100, then 100->0 and would like your 100 to be controllable. In this case i think this would work.x=value[0]*effect("Slider Control")("Slider")/100;
[x,value[1]]
You must adjust the "effect("Slider Control")("Slider")" to your slider by pickwhiping to it.

Andrei
My Envato portfolio.


Return to posts index

Ryan Hagen
Re: Control scale keyframes with slider
on Dec 6, 2017 at 2:11:37 pm

Thank you Andrei, that worked well enough, I just need to make sure the slider is set to 100 and it works like a charm. Thank you for your help!!!


Return to posts index

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