• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Explorer ,
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

282

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

LEGEND , 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

Votes

Translate

Translate
LEGEND ,
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

Votes

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
Explorer ,
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 😞

Votes

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.

Votes

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

 

Votes

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