How can I make toggle switch with checkboxes in After Effects?

Community Beginner ,
Aug 24, 2022 Aug 24, 2022

Copy link to clipboard

Copied

I have a simple task, it is necessary that when one checkbox is on, the rest are turned off according to the toggle switch principle, how to create this using expressions in After Effects?

TOPICS
Expressions , How to , Scripting

Views

60

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 24, 2022 Aug 24, 2022

You can't. Checkbox controls are read-only and cannot be modified from within the expression. You have to think of another method. Explaining what you are actualyl trying to do might allow us to advise.

 

Mylenium

Likes

Translate

Translate
Community Expert ,
Aug 24, 2022 Aug 24, 2022

Copy link to clipboard

Copied

You can't. Checkbox controls are read-only and cannot be modified from within the expression. You have to think of another method. Explaining what you are actualyl trying to do might allow us to advise.

 

Mylenium

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 24, 2022 Aug 24, 2022

Copy link to clipboard

Copied

Thank you for answer!
I just wanted to know if there is actually possible, thats a pity that is not 😞

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 24, 2022 Aug 24, 2022

Copy link to clipboard

Copied

If you're trying to simulate a set of radio buttons (only one can be on at a time) a Dropdown Menu Control is often a workable alternative.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 24, 2022 Aug 24, 2022

Copy link to clipboard

Copied

LATEST

This works:

 

if (effect("Checkbox Control 2")("Checkbox") == 1){
	0;
}

else{
	value
}

 

As long as Checkbox 2 is not selected (checked), the Checkbox with this expression can be on or off. If you select Checkbox 2, the checkbox with the expression will be turned off. 

RickGerard_0-1661358552467.gif

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines