ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

If Else with multi checkbox values

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Scott Moore
If Else with multi checkbox values
on Apr 18, 2018 at 3:20:03 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];


Return to posts index

Scott Moore
Re: If Else with multi checkbox values
on Apr 18, 2018 at 3:27:49 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];


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]