Skip to main content
Known Participant
January 22, 2024
Question

Dropdown menu breaks when keyframed

  • January 22, 2024
  • 1 reply
  • 548 views

Hi, 
in a main comp i have a settings layer with a dropdown-menu (21 items). 

Two precomps within this main comp there are a bunch of layers with hold frames.

The hold frames control the display of different nested logos and have this expression on timeremap:

dropDownIndex = comp("Main").layer("Settings").effect("Banden_Setup")("Logos_Position_x").value; 
var myFramerate = 25;
switch ( dropDownIndex ){
case 1: 1/myFramerate;
break;
case 2: 2/myFramerate;
break;
case 3: 3/myFramerate;
break;
case 4: 4/myFramerate;
break;
case 5: 5/myFramerate;
break;
case 6: 6/myFramerate;
break;
case 7: 7/myFramerate;
break;
case 8: 8/myFramerate;
break;
case 9: 9/myFramerate;
break;
case 10: 10/myFramerate;
break;
case 11: 11/myFramerate;
break;
case 12: 12/myFramerate;
break;
case 13: 13/myFramerate;
break;
case 14: 14/myFramerate;
break;
case 15: 15/myFramerate;
break;
case 16: 16/myFramerate;
break;
case 17: 17/myFramerate;
break;
case 18: 18/myFramerate;
break;
case 19: 19/myFramerate;
break;
case 20: 20/myFramerate;
break;
case 21: 21/myFramerate; 
}; 

Simple stuff, and it works just fine. I add hold keyframes to the dropdown menu item. Still ok. But now when i add another second keyframe for the dropdown menu items the first one gets broken for some (not all) entries and won't show the desired result. I remove the second key and it's ok again.

Also tried an else if statement with the same result.  

Anyone has an idea? Am i missing something? Do keyframes on dropdown menu items suppose to work anyway?
Thanks

This topic has been closed for replies.

1 reply

Community Expert
January 22, 2024

If you are keyframing a menu control, you only have Hold keyframes. You can't change that. I just threw the expression on a text layer and fixed the link to the menu control and everything works fine, no matter how many keyframes I add.

 

WallroffAuthor
Known Participant
January 22, 2024

i know that i have to use hold keyframes. That is not part of the problem.

Again, maybe i wasn't clear:

Main Comp (a) with dropdown menu ---> 8 duplicates of a work comp (b)---> in each of these work comps there are 12 logo holder precomps (c) on different positions (with the mentioned expressions on it on timeremap) ---> the logo holder comp contains 21 logos each placed on a single frame

The idea is to be able to set all 12 logos from the range of the 21 possible logos controlled from the main comp settings layer.

This works fine with one or no keyframes. Placing more than one keyframe breaks the correct functionality and results in wrong displayed logos (though the red resulting value on timeremap is correct!).
Maybe i oversee a bad structure resulting in a conflict or there is a conflict in the interaction of the dropdown and the timeremap (a bug?).

Community Expert
January 23, 2024

It would really help to see a fully expanded flow chart for your comp structure. 

 

If you have the 21 logos in a single comp that was 21 frames long, you could access any of the frames with this very simple expression applied to the nested comp's Time Remap property:

val = thisComp.layer("Settings").effect("Dropdown Menu Control")("Menu") * thisComp.frameDuration - thisComp.frameDuration;

I'm not sure how you set up 21 logos on a single frame and access the position of each logo with a dropdown menu. You need 21 different position values in relation to the anchor point. That seems incredibly convoluted. I'm guessing that you are trying to access the logo and its position on 21 layers. 

 

Do you need to move the logos around or just turn them on as the dropdown menu is animated? If all you need to do is turn on a specific logo in a time-remapped comp, take the index number times the frame duration, and then subtract from that value will give you frame one at time zero, frame 12 at frame 11, and so on. Everything should work just fine:

If that does not help, please share screenshots by dragging them to the reply field on the forum instead of using the "Drag & Drop here...." area so we don't have to download them to see them.