Quantcast
Channel: Adobe Community : Popular Discussions - After Effects Expressions
Viewing all articles
Browse latest Browse all 47983

Expression error using checkbox control

$
0
0

I'm trying, for the first time, to create an expression that controls a value depending on whether or not a keyed checkbox is on.  This is my code.

 


x = comp("overlay grain").layer("frame").transform.position;

 

If (effect("Frame Stutter")("Checkbox") == true)
{
    value = x + wiggle(25,5);
}
Else
{
    value = value + wiggle(25,5);
}

 


When I run this, I get the error:

 


After Effects warning: Function If is undefined
Expression disabled.

 

Error occurred at line 3.
Comp: 'main'
Layer: 1 ('Date Stamp')
Property: 'Position'

 


I have been racking my brain over what the problem is.  I have used If/Else statements in the past successfully and I know that there is just something very simple that I am missing.  I have also tried using "== 1" instead of "== true", but I got the same result.

 

Help please.


Viewing all articles
Browse latest Browse all 47983

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>