Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Why doesn’t this simple if statement work correctly?

  • Xavier Gomez

    September 14, 2012 at 10:21 am

    I just tried your expression and there is no error.
    So it works but maybe not the way you intented it.
    If you are trying to loop a linear motion from bottom to top it for sure cannot make it.

    You should tell what you actually want to do.

    Xavier.

  • Kevin Camp

    September 14, 2012 at 2:23 pm

    i seem to remember that a recent version of ae (maybe cs5.5 or 6) had an issue with the term ‘this’ in objects… i believe that it was adressed in an update, so make sure you have the latest update installed for your version of ae.

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Ryan Paterson

    September 14, 2012 at 4:47 pm

    yes, trying to loop linear motion. what am I doing wrong?

  • Dan Ebberts

    September 14, 2012 at 6:48 pm

    I’m not sure exactly what you’re after, but play around with this and see if it gets you closer:

    y = (value[1] – time*250)%thisComp.height;
    if (y < 0) y += thisComp.height;
    [value[0],y]

    Dan

  • Ryan Paterson

    September 14, 2012 at 7:02 pm

    Ahhhhh modulus I ALWAYS forget about that thank you!

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