Activity › Forums › Adobe After Effects Expressions › One value to a Slider control
-
One value to a Slider control
Posted by Sanjeev Ramanathan on January 5, 2011 at 7:47 amCan anybody help me to link the slider control to the Y value of the position layer.
I have a series of circles which are placed in a row, and i want to move only on the ‘Y’value, I created a slider in a Null and i want to link to Y value of the position of the circle. How do i do that?
Thanks
sanj.Dan Ebberts replied 10 years, 11 months ago 5 Members · 11 Replies -
11 Replies
-
Dan Ebberts
January 5, 2011 at 2:23 pmIf you want to set the y value with the slider, you could do it like this:
y = thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”);
[value[0],y]If you just want to adjust the y value with the slider, this would work:
yAdj = thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”);
value + [0,yAdj]Dan
-
Sanjeev Ramanathan
January 13, 2011 at 3:27 amHiDan,
Iam using the one where i can adjust the y value
(yAdj = thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”);
value + [0,yAdj].After i linked the circle to the slider, its working fine. But i have one more issue i want to stop the slider at 80 (80 should be the max., even if i slider more than 80 it shouldn’t move). Now, how do i lock the value at 80 so i can move from 0 to 80 only.
Thanks
sanj. -
Dan Ebberts
January 13, 2011 at 3:32 amSomething like this should work:
yAdj = thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”);
value + [0,Math.max(yAdj,80)]Dan
-
Ben Robinson
November 17, 2011 at 8:21 amI’m sure this is fairly elementary–but I’m almost completely in the dark when it comes to expressions. Is there a way to link the position value (specifically the y value) of one layer to a slider control so that 1 on the slider is the starting y value (in this case -30), then 2, 3, 4…etc. each increase the y value by 55?
Any help hugely appreciated.
Cheers
-
Dan Ebberts
November 17, 2011 at 2:45 pmSomething like this should work:
s = effect(“Slider Control”)(“Slider”);
[value[0],(s-1)*55-30]Dan
edit: oops, I had a typo in there
Dan
-
Ben Robinson
November 17, 2011 at 8:34 pmDan, you’re amazing. I realise that was probably pretty basic–but it really helped me out and I often see your name pop up with regular help and advice. Nice one.
Cheers
Ben
-
Losits Robert
January 15, 2014 at 5:59 pmHello, I need some help.
How can I increase Slider’s Max Value over 1000000?Thanks for your help! 🙂
-
Dan Ebberts
January 15, 2014 at 6:16 pmI don’t believe there’s any way to do that. There may be workarounds though, depending on what you’re trying to do.
Dan
-
Francisco Rodriguez
May 29, 2015 at 12:27 amHi dan,
if this expression works with the Y value
yAdj = thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”);
value + [0,yAdj]What is the expression for x value?
thanks!
Reply to this Discussion! Login or Sign Up