-
Use a dropdown to select an array?
So, I have 40 different shows, each with 4 different layouts and I need to park a day/time box on a specific point on each layout. Sadly, the layouts are slightly different for each show so there’s no “one size fits all” approach.
So I thought each show has an array of four positions, one for each layout, and select the position via a “Layout” dropdown. Easy enough.
b=thisComp.layer("controls").effect("layout 2")("Menu"); //value of Layout menu
show1=[[50,50],[500,50],[50,500],[500,500]]; //array of possible positions show 1
show2=[[100,100],[500,100],[100,500],[500,100]]; //array of possible positions show 2
show2[b-1]Now the problem I’m hitting is selecting the correct array via a “Show” dropdown. I’ve tried multiple approaches, including an array of names matching the list of array names, selected by the “Show” dropdown. No dice. It seems to return the correct value but AE doesn’t see it as a variable name.
a=thisComp.layer("controls").effect("show")("Menu"); //value of Show menu
showList=["show0","show1","show2"];
showName=showList[a];
showName[b-1]Is there a way to pass a dropdown value to a variable name or is my logic fundamentally faulty?