Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions If Else with multi checkbox values

  • If Else with multi checkbox values

    Posted by Scott Moore on April 18, 2018 at 3:20 pm

    I’m try to use checkbox controller to place the position of a text line. There are 2 checkbox and depending on the combination of the 2 checked determines the position value. Only 4 possible placements. I currently don’t get an error on the expression, but it doesn’t work. What am I missing?

    Thanks,

    Scott

    CTRL1 = effect("Show 1 Controller")("Checkbox"); value
    CTRL2 = effect("Show 1 Controller")("Checkbox"); value
    if ((CTRL1 == 1) && (CTRL2 ==1)) [960,540]
    else if ((CTRL1 == 0) && (CTRL2 ==1)) [960,575]
    else if ((CTRL1 == 1) && (CTRL2 ==0)) [960,550]
    else if ((CTRL1 ==0) && (CTRL2==0)) [960,580] else [0,0];

    Scott Moore replied 8 years, 5 months ago 1 Member · 1 Reply
  • 1 Reply
  • Scott Moore

    April 18, 2018 at 3:27 pm

    I figured out my issue. I didn’t rename the 2nd controller to match the check box… duh!!!!

    CTRL1 = effect("Show 1 Controller")("Checkbox"); value
    CTRL2 = effect("Show 2 Controller")("Checkbox"); value
    if ((CTRL1 == 1) && (CTRL2 ==1)) [960,540]
    else if ((CTRL1 == 0) && (CTRL2 ==1)) [960,575]
    else if ((CTRL1 == 1) && (CTRL2 ==0)) [960,550]
    else if ((CTRL1 ==0) && (CTRL2==0)) [960,580] else [0,0];

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