Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expression error using Checkbox control

  • Expression error using Checkbox control

    Posted by Brock Jolet on March 24, 2010 at 8:48 pm

    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.

    Brock Jolet replied 16 years, 1 month ago 32,976 Members · 1 Reply
  • 1 Reply
  • Brock Jolet

    March 24, 2010 at 9:00 pm

    Just figured it out guys. “if” cannot be capitalized. Hope this helps someone else.

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