ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Only One Checkbox Selected Expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Nathaniel Costa
Only One Checkbox Selected Expression
on Aug 10, 2015 at 3:53:28 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?



Return to posts index

Dan Ebberts
Re: Only One Checkbox Selected Expression
on Aug 10, 2015 at 4:11:14 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



Return to posts index

Nathaniel Costa
Re: Only One Checkbox Selected Expression
on Aug 10, 2015 at 4:26:27 pm

Thanks


Return to posts index


Luis Martinez
Re: Only One Checkbox Selected Expression
on Aug 25, 2015 at 6:01:43 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.


Return to posts index

Martin Lanciano
Re: Only One Checkbox Selected Expression
on Jan 31, 2019 at 6:41:36 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 }


Return to posts index

Kalleheikki Kannisto
Re: Only One Checkbox Selected Expression
on Feb 3, 2019 at 12:28:40 pm

Moving forward on the timeline, the checkbox reverts to "a".

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

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