Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects if statement

  • if statement

    Posted by Nelson Fernandes on March 13, 2009 at 9:58 pm

    Hi guys. I’m trying but not having success. What would be the correct syntax for this if statement

    if the rotation is equal 90, opacity should go to 25
    otherwise
    opacity should stay at 100

    Thanks.

    Darby Edelen replied 17 years, 2 months ago 3 Members · 2 Replies
  • 2 Replies
  • Kevin Camp

    March 13, 2009 at 11:03 pm

    something like this should work:

    if (transform.rotation==90) 25 else 100

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Darby Edelen

    March 14, 2009 at 8:32 am

    [Kevin Camp] “something like this should work:

    if (transform.rotation==90) 25 else 100”

    Kevin is correct, but I have to wonder if this is actually what you want? Using this expression the layer would ‘flash’ down to 25% opacity at 90° rotation and 90° rotation only.

    It would not go to 25% opacity at 2x 90° (810°) for example. It also would not fade into the 25% opacity.

    Perhaps this is what you wanted, but if not then you’ll need to provide more specific details for a more specific expression.

    Darby Edelen

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