Copy link to clipboard
Copied
I'm trying to create a bar-graph animation, where I put in the percentage, and then it automatically slides in over X number of frames (in this case, 20 frames), as dictated by a controller layer. But instead of the animation beginning at the inPoint of the layer and then ending 20 frames later, the animation begins at the inPoint and then jumps to the final value at frame 20 of the composition (not the layer). What's really strange is that it is smooth at the outPoint, without any jumping.
slideInDuration = thisComp.frameDuration * thisComp.layer("Controller").effect("Slide In+Out - frames")("Fade In Duration (frames)");
slideOutDuration = thisComp.frameDuration * thisComp.layer("Controller").effect("Slide In+Out - frames")("Fade Out Duration (frames)");
slideInAmount = linear(time, thisLayer.inPoint, thisLayer.inPoint+slideInDuration+0.001, -23, value);
slideOutAmount = linear(time, thisLayer.outPoint-slideOutDuration-0.001, thisLayer.outPoint, value, -23);
if (time<slideInDuration) {slideInAmount}
else if (time<slideOutDuration) {value}
else if (time<thisLayer.outPoint) {slideOutAmount}
else {-23}
Please help! Thanks.
Try replacing the last 4 lines with this:
time < inPoint + slideInDuration ? slideInAmount : slideOutAmount
Copy link to clipboard
Copied
I don't know that it matters, but I use Adobe CS5.5.
Copy link to clipboard
Copied
Try replacing the last 4 lines with this:
time < inPoint + slideInDuration ? slideInAmount : slideOutAmount
Copy link to clipboard
Copied
That's exactly what I need! Thank you!