Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions if/else expression depending on whether a value is growing or shrinking

  • if/else expression depending on whether a value is growing or shrinking

    Posted by Gerard Bowden on March 11, 2014 at 9:32 pm

    is it possible to use whether a value is going up or down to control an if/else expression?

    for instance, I have a slider and i want to make it where if the slider is moving up/positive then use expression x otherwise use expression y.

    ifthisistrue = Slider is moving up;

    thishappens = x;

    otherwisethishappens = y;

    if (ifthisistrue)
    {
       thishappens;
    }

    else
    {
    otherwisethishappens;
    }

    Gerard Bowden replied 12 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    March 11, 2014 at 10:50 pm

    It would be like this:

    s = effect(“Slider Control”)(“Slider”).speed;
    if (s > 0){
    // going up
    }else if (s < 0){
    // going down
    }else{
    // not moving
    }

    Dan

  • Gerard Bowden

    March 12, 2014 at 6:56 pm

    Thanks, works great. I really appreciate it.

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