I'm trying to set up an after effects template where an artist can plug in a number via set expression controls and have the program automatically animate the attribute for them. for example, if they plug in the number 25, the program will scale an object from 0 to 25 over a set amount of time. Unfortunately i haven't gotten far. I was trying to reverse engineer this expression:
eg = Math.floor(time/(moveTime+holdTime));
t = time % (moveTime+holdTime);
value + delta*seg + ease(t,holdTime,holdTime+moveTime,0,delta)
but can't figure out it animates the delta and how to stop it from continuing. any help would be appreciated, thanks!
The expression you're looking at doesn't seem to match your description of what you're trying to do. You want the user to be able to enter a value into a slider control and have the expression scale the layer from 0 to the entered value over some period of time, correct? How will you specify the duration and the start time of the animation?
Here's a simple example that does a 1-second scale up (starting at the layer's In Point) from 0% to the value entered into the slider:
s = effect("Slider Control")("Slider");
dur = 1; // 1 second