Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Previous keyframe triggered movement

  • Previous keyframe triggered movement

    Posted by Fletcher Groeneman on October 16, 2019 at 5:56 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

    Fletcher Groeneman replied 6 years, 10 months ago 1 Member · 1 Reply
  • 1 Reply
  • Fletcher Groeneman

    October 16, 2019 at 7:19 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

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy