# In After Effects how do i link a value in a shape layer to a slider control keeping the values relative?

I've created a shape layer with an elipse and used trim paths to just show an arc. The full arc has a trim paths end value of 87.5% and empty the end value is 62%. I want to link the trim paths end to a slider control so that the 87.5% and 62% on the trim paths equate to 100 and 0 respectively on the slider control.

I've also linked a text layer to the slider control value so that it displays that value. The text layer and shape layer would be effectively displaying the same value so it made sense to want to use one control to animate both.

I appreciate i would need to use some form of expression, however my knowledge of these is limited. here's the problem

You'll need the linear expression.

linear(t, tMin, tMax, value1, value2)

t is the value it is referencing. In your case it would be the slider.
The next two are the min and max of your slider so 0 and 100
value 1 and 2 are what the expression will remap the min and max to.
value1 = 62
value2 = 87.5

Or, if you just want to copy and paste...

t = pick whip your slider value here;
linear(t, 0, 100, 62, 87.5);

• A straight answer with a breakdown,Perfect.Thank you. – tpg Mar 11 at 20:19