Copy link to clipboard
Copied
I am trying to use the dropdown expression to move the pointer on a map. The tutorials I have seen seem to reference other layers. I just want to change the x,y coordinates of the layer. Has nayone seen any good documentation on how to do this? Still learning expressions. Mostly just used with the pickwhip in the past. Any help is appreciated.
Thanks,
Scott
Copy link to clipboard
Copied
You would have to manually populate a custom dropdown control using an enumerated list. This has nothing to do with the automated layer control. It's explained somewhere, but I can't find the link right away...
Mylenium
Copy link to clipboard
Copied
Here is what I have so far. I get the error "Undefined is not an object"
thisComp.layer("pointer").effect("Dropdown Menu Control")("Menu");
if (Effect("Dropdown Menu Control").value == 1) value = 100,100;
else if (Effect("Dropdown Menu Control").value == 2) value = 250,250;
Any suggestions are appreciated
Copy link to clipboard
Copied
"value" is a reserved keyword. You cannot use it as your variable name. Other than that I think the syntax is wrong, but I'm really not sure where that dang post or tutorial can be found that explains it. Sorry for being so useless!
Mylenium
Copy link to clipboard
Copied
With a slightly clearer head this morning some questions spring to mind: Have you actually edited the enttries in the menu? What type are they? Also rename the effect to something more telling than its default name. Other than that your position outputs should be arrays so you don't need to use conditionals:
mMenu=thisComp.layer("Pointer")effect("Positions).value;
mPos=[[100,100],[250,250],[340,340]];
mX=mPos[mMenu][0];
mY=mPos[mMenu][1];
[mX,mY]
Mylenium