Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Only One Checkbox Selected Expression

  • Only One Checkbox Selected Expression

    Posted by Nathaniel Costa on August 10, 2015 at 3:53 pm

    I have three checkboxes on a layer.
    Only one box should be checked at a time.
    I wrote an expression to uncheck the other two boxes when one is checked.
    It works until the playhead is moved then it reverts to the original values of the checkboxes.

    Can anyone help me figure this out?

    Kalleheikki Kannisto replied 7 years, 6 months ago 5 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    August 10, 2015 at 4:11 pm

    My advice–think of another way to do what you’re trying to do. I don’t think there’s a stable solution to the “force checkboxes to act like radio buttons” problem.

    Dan

  • Nathaniel Costa

    August 10, 2015 at 4:26 pm

    Thanks

  • Luis Martinez

    August 25, 2015 at 6:01 am

    I had the same problem once and I think Dan is right, there is no such thing in AE as “radio button code”. The solution I found was rather elegant: Pop-up menus.

    These pop-ups behave just like radio buttons, the only downside is that they’re not available as expression controls yet within AE (like Point, Color, Angle, etc.), so you must built a Pseudo Effect first and place them there. I use BatchFrame’s Custom Controls Creator and it works pretty well. I recommend you to watch all the tutorials so you can see how it works.

    Cheers.

  • Martin Lanciano

    January 31, 2019 at 6:41 pm

    This seems to do the trick:

    a=effect("a")("Checkbox");
    b=effect("b")("Checkbox");
    c=effect("c")("Checkbox");

    if (a+b+c == 0)

    { 1 }

    else if (a+b+c > 1)

    { 0 }

    else { value }

  • Kalleheikki Kannisto

    February 3, 2019 at 12:28 pm

    Moving forward on the timeline, the checkbox reverts to “a”.

    Kalleheikki Kannisto
    Senior Graphic Designer

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