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

Dropdown opacity expression help. Muiltiple Items

New Here ,
Mar 24, 2025 Mar 24, 2025

When I need a layers opacity to turn on for a specific dropdown item I'll sometimes use this expression:

dropdown = comp("CHOOSE LOGO HERE").layer("CHOOSE LOGO HERE").effect("Choose Station Logo")("Menu"); dropdown == 1 ? 100 : 0;

 

However, what if I need they layer opacity to be 100 for more than one dropdown item. Say == 1, 8, 22 ? 

I can't seem to figure out how to get this to work. Any help?

TOPICS
Expressions
390
Translate
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 ,
Mar 24, 2025 Mar 24, 2025

This should work:

m = thisComp.layer("CHOOSE LOGO HERE").effect("Dropdown Menu Control")("Menu");
m == 1 || m == 8 || m == 22 ? 100 : 0
Translate
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 ,
Mar 24, 2025 Mar 24, 2025

Sorry, didn't catch that you had renamed the dropdown. This is better:

m = thisComp.layer("CHOOSE LOGO HERE").effect("Choose Station Logo")("Menu");
m == 1 || m == 8 || m== 22 ? 100 : 0

 

Translate
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
New Here ,
Mar 24, 2025 Mar 24, 2025

This works! It's crazy because I feel like i've ftried this. Is their something about "m" that makes this work?  Anyways thank you!

Translate
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 ,
Mar 24, 2025 Mar 24, 2025
LATEST

No, it's just a shorter variable name than "dropdown".

Translate
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