Understanding Triggers

Jun 30, 2014

See attached .story file. I am wondering if there is an easier way!

When you click the color buttons (Red, Green, Blue, Yellow) the correspoinding color in the grid goes dark (changes states of the corresponding color blocks to off) and the breadcrum appears. When you click the "X" button for that corresponding color comes back on (changes color block state back to normal). As you can see there are a lot of triggers. I would like to be able to click on the "red" button and have it work as it does now but, when I click the red button again, I would like have happen what clicking the "X" button does now. Creating a toggle effect for each color. I need to be able to toggle them on and off endlessly and in any combination. If you need more clarification, let me know and thanks in advance for the tips!   

6 Replies
Ashley Terwilliger-Pollard

Hi Philip,

Thanks for sharing your file here. I wanted to make sure I understood correctly - so what you would like to have happen is that the user only has to click the labelled buttons (like the "red" button) and it would toggle the state of that button and the colored squares? So essentially the user would not have to use the X button? You could set this up with conditions on the trigger - so it would look something like:

Change the state of Rectangle 1 to Normal when the user clicks on the "red" button, on the condition that the red button is in the "down" state

It's still going to be a lot of triggers though - are you trying to limit the overall amount of triggers? 

Philip Johnson

Ashley Terwilliger said:

Hi Philip,

Thanks for sharing your file here. I wanted to make sure I understood correctly - so what you would like to have happen is that the user only has to click the labelled buttons (like the "red" button) and it would toggle the state of that button and the colored squares? So essentially the user would not have to use the X button? You could set this up with conditions on the trigger - so it would look something like:

Change the state of Rectangle 1 to Normal when the user clicks on the "red" button, on the condition that the red button is in the "down" state

It's still going to be a lot of triggers though - are you trying to limit the overall amount of triggers? 

I am okay with the number of triggers my main goal is to eliminate the "X" button. I will try what you suggested and let you know! Thanks for the response.

Michael Hinze

One option to eliminate the need for the X button and reduce the number of triggers is this:

1. Replace your custom down state for the red, green, etc. buttons with a built-in selected state

2. Add a True/false variable for each color that is then toggled by its corresponding color button

3. Add slide triggers that change the state of the color squares based on the value of that variable.

See attached file where I changed the setup for Red to the way I would approach it. Hope that gives you some ideas.

Chris Fletcher

Do you need to have all the individual squares?

Could you select all the red ones together and right click and save as image, then do the same with the other colours and lay the 4 images (Red, Green, Blue, Yellow) on top of each other?

Then your buttons could just have 2 triggers - to display the image if they are hidden and hide them if they are visible.

Philip Johnson

You are all awesome!!

Take a look at the final product. Chris, I took your suggestion and combined the squares into an image. I created a blank state for the picture of the squares as well. Combining them cut down on triggers a lot! Michael, I took your suggestion and setup the triggers as you have them in your example and changed my down state to a selected state and it works perfect. Doing all that work was above and beyond and I appreciate it. Ashley, I am not sure why I couldn't get your suggestion to work but I have a feeling it was something about the states of the button but, thank you for your suggestion.

This discussion is closed. You can start a new discussion or contact Articulate Support.