Coordinating Images via JSON file Dropdown Manu Control

New Here ,
Oct 17, 2020

Copy link to clipboard

Copied

Hi I have this question about how can I get the "Logo.png" coordinates via "TEAM" (ANGEL ALLIANCE) to show the image using Dropdown Menu Control.

 

I'm currently using the "TN" for it's value 1-16 teams and each number coordinates with a specific logo.

[
 {
   "RANK": "1st",
   "TEAM": "ANGEL ALLIANCE",
   "KP": 158,
   "WWCD": 8,
   "TOTAL": 265,
   "TN": 1
 },

 but the problem is all of the data that I'm using are automatically gathered but I have to jump in the script and manually put "TN" : 1-16 for the "Logo.png" in the Dropdown Menu Control to coordinate it.

 

Here's the layout

Untitled-1 copy.jpg

The Dropdown Menu Control
Untitled-1 copy2.jpg

carl98A7_0-1602993855336.png

 

team = thisComp.layer("Control").effect("TEAMS")("Menu").value;

if (team == index - 1) {
	100
} else {
	0;
}

 Thank you very much for your time.

TOPICS
Expressions

Views

54

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
carl98A7 AUTHOR
New Here ,
Oct 17, 2020

Copy link to clipboard

Copied

I forgot to show this one

The composition here I coordinated to json

carl98A7_0-1602994045174.png

 



Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Oct 18, 2020

Copy link to clipboard

Copied

Without seeing how you are actually using the JSON for the other variables, I can only suggest the following algorithm -

 

 

1) use the Red Vertical Bar's (RVB) x-position as Landmark for offseting the x-Position of each logo

 

2) use TN to decide if a logo should be placed to the left or right of the RVB - for example,

if TN<=8 then xPos Offset == -offsetValue

else xPos Offset == offsetValue

 

3) Now, check for the y-position of each Team's name and use this to get the y-position to place each logo.

 

Make sense?

 

 

<br>Development | Consulting | Training>Motion Graphics Brand Guidelines & Motion Graphics Responsive Design Solutions <br><br>Development | Consulting | Training

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more