ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Dynamic Animated Slider

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Cerith White
Dynamic Animated Slider
on Aug 2, 2019 at 9:24:13 pm
Last Edited By Cerith White on Aug 2, 2019 at 9:46:11 pm

Hi all,

I have a graphic designed to show statistics during live sport coverage...it uses a slider to set the number value and animates solid layers and mask paths to the correct position set by the user.

I'm having an issue reversing the animation, it works perfectly animating in...but when I add the animate out expression, both the "gfxIn" and "gfxOut" expressions happen simultaneously.

Would appreciate any help.

slider=thisComp.layer("Home No.").effect("Slider Control")("Slider")*28;

animationTime = 1;

animationStart = 0; // start at 2 sec from beginning of comp

startPos = 0;

endPos = slider;

returnTime = 5;

returnPos = 0;

gfxIn = ease(time, animationStart, animationStart + animationTime, startPos, endPos);

gfxOut = ease(time, returnTime, returnTime + animationTime, endPos, returnPos);


Return to posts index

Dan Ebberts
Re: Dynamic Animated Slider
on Aug 2, 2019 at 10:32:27 pm

Try replacing the last two lines with this:


if (time < returnTime){
gfxIn = ease(time, animationStart, animationStart + animationTime, startPos, endPos);
}else{
gfxOut = ease(time, returnTime, returnTime + animationTime, endPos, returnPos);
}



Dan



Return to posts index

Cerith White
Re: Dynamic Animated Slider
on Aug 2, 2019 at 10:56:10 pm

Hero!

Thanks Dan, That's worked perfectly.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]