ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Previous keyframe triggered movement

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Fletcher Groeneman
Previous keyframe triggered movement
on Oct 16, 2019 at 5:56:51 pm

I have a layer I want to position differently if an expression control checkbox is ON vs OFF.

It is all working except it changes back as it approaches the next checkbox keyframe:

cb = thisComp.layer("Controller").effect("Alert")("Checkbox");
t = cb.nearestKey(time).time
value1 = [33.6667, 161.4107]
value2 = [33.6667, 141.4107]
dur = 1
start = t
end = t+dur

if (thisComp.layer("Controller").effect("Alert")("Checkbox") == true) ease(time, start, end, value1, value2)
else ease(time, start, end, value2, value1)

How do I write it so that this animation only triggers AFTER the keyframe?

- Fletcher Groeneman


Return to posts index

Fletcher Groeneman
Re: Previous keyframe triggered movement
on Oct 16, 2019 at 7:19:57 pm

Better yet, how would I have the animation trigger if a value goes above a certain threshold.

IE if a number is > than 5 play this animation ease(time, start(as soon as the value went above the threshold), end (start + duration), value1, value2)

But once it returns to under the threshold of 5 reverse that animation like this: ease(time, start(as soon as the value went back below the threshold), end (start + duration), value2, value1)

- Fletcher Groeneman


Return to posts index

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