Copy link to clipboard
Copied
I'm new to expressions and trying to find a way to simplify a slider I have for a client.
There's a scaling/stretching animation I have on a null layer called VerticalSlider that starts from 0 on the slider (obviously), goes to 18, and then increases to 83 for a little "bounce" before settling in at its final position at 78.
The point is to have it so the slider is easily customizable for my client in that the opening animation of 0-18 is always the same, but the animation from 18-78 is adjustable so that the animation can stretch less or more.
To tackle this, I've figured a way to simplify things (but also help with some math stuff I'm going to have to do for other expressions that have to be tied to this slider), I want to edit it so that the value of "18" is "0" and the value of "78" is "1." So 0-17 will be negative and 79-83 will be over 1, but the basic scale will be 0-1.
As someone who doesn't really understand the language of expressions yet but can deduce a few things through googling, I've found an expression that I think SHOULD work:
However, it's giving me an error:

I had a friend put it in their system and they said they did not receive an error.
I'm sure the answer is super simple and I'm just a dunce, but any help would be appreciated. Thank you!!
Copy link to clipboard
Copied
You're putting this expression on the slider, not on the Position of a layer! That's why you're seeing the error.
At the very last line, you give it [x, value[0]] -- an array that contains two dimensions (X and Y). However, the Slider that you're putting the expression on, is only expecting a single value, not this 2d coordinate.
Thus, remove the expression from the slider and apply it to the layer's position instead, and it should all work out.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more