Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Drop Down expression with coordinates

Community Beginner ,
Aug 12, 2021 Aug 12, 2021

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

TOPICS
Expressions

Views

22

Likes

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
Adobe Community Professional ,
Aug 13, 2021 Aug 13, 2021

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

Likes

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 Beginner ,
Aug 13, 2021 Aug 13, 2021

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

 

 

Likes

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
Adobe Community Professional ,
Aug 13, 2021 Aug 13, 2021

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

Likes

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
Adobe Community Professional ,
Aug 14, 2021 Aug 14, 2021

Copy link to clipboard

Copied

LATEST

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

Likes

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