Creating a drop-down menu with layers and triggers

Jul 28, 2022

I have been stuck trying to make the triggers work on a drop-down menu I created. 

I created the initial drop down from a rectangle shape on the base layer. Then, created a trigger so that when the user clicks this rectangle shape, it shows a new layer. On the new layer are more rectangles that appear directly below the drop down. There are states created for each so when the user hovers over each shape, it becomes highlighted. 

The problem comes when I try to create a trigger for the initial drop down on the base layer to change states. I want the answer the user selects in the new layer to fill in the original rectangle on the base layer. 

I have looked for tutorials and can't figure out what I'm doing wrong. 

Any advice?

6 Replies
Maria Costa-Stienstra

Hi, Lisa.

Thank you for reaching out!

If it works for your design, my suggestion is to use a variable to hold a value, depending on the choice selected:

  • Create a text variable. In my example, it's called OptionSelected, with a default value of "Choose an option".
  • Insert a reference to that variable on the initial drop-down on your base layer.

  • On your layer that lists the different options, add triggers to change the value of the variable when the user clicks a specific option:

Here's a preview:

I hope this helps!

Maria Costa-Stienstra

Hi, Lisa.

No apologies are necessary! I'm happy to clarify!

When you create the trigger Adjust variable, "Set" will be the only option for Text variables. If you use a number variable, instead, clicking the word Set will give you additional options (Add, Subtract, Multiply and Divide). On a True/False variable, you will also see Toggle

Let me know if that helps!

Maria Costa-Stienstra

Hi, Lisa.

Thank you for sharing the .story file!

You only have to make two adjustments, so it works as expected:

  • On your base slide, you need to add a reference to the variable DropDown so it shows its value. Since the default value is "Select response", that's what it will initially say, and you don't have to type that manually. (Insert > Reference > DropDown)

Let me know if that works!