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

Swicth() / case difficulty

New Here ,
Sep 08, 2021 Sep 08, 2021

The following expression aims at setting the value of a Tumble  parameter according to a choice from a dropdown menu expression controller. The dropdown menu does make its way to  the "xx" variable. The swicth doesn't work. I am not getting an error from the expressio parser.  The variable "jjj" remains stuck on its initialized value. Any ideas?  Thanks ahead for any clues!

 

 

var xx = thisComp.layer("OFFSET").effect("FLIP MODE")("Menu");
var jjj = 0
switch(xx){
case 1: jjj =0; break;
case 2: jjj =10; break;
case 3: jjj =30; break;
case 4: jjj =50; break;
case 5: jjj =90; break;
case 6: jjj =130; break;
case 7: jjj =180; break;}
jjj;

TOPICS
Expressions
256
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

correct answers 1 Correct answer

Community Expert , Sep 08, 2021 Sep 08, 2021

Try changing your first line to this:

var xx = thisComp.layer("OFFSET").effect("FLIP MODE")("Menu").value;
Translate
New Here ,
Sep 08, 2021 Sep 08, 2021

var jjj = 0; (a cut paste error. the semi-colun is there!)

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 ,
Sep 08, 2021 Sep 08, 2021

Try changing your first line to this:

var xx = thisComp.layer("OFFSET").effect("FLIP MODE")("Menu").value;
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 ,
Sep 08, 2021 Sep 08, 2021
LATEST

Grumph... As I was looking at it, i just KNEW it would turn out to be something silly like that.. Thanks, Dan!

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