Showing Layers with Triggers

Hi, Newbie here.

I have to create the following in Storyline.

I have 5 pictures. I want to show a different picture each time a button is clicked.  I have each picture on its own layer.

So the first time the button is clicked picture 1 will show, the second time the button is clicked picture 2 will show, etc. 

I'm stumped!  I've done this in Flash but can't figure out how to do it here in Storyline.


7 Replies
Josh Uhlig

You just need a variable and trigger that counts the button clicks, and a trigger for each picture with a condition that the count variable's value equals a specific number.

Here is what you need to do:

  1. Add a new variable with an initial value of zero. (Use the X icon under triggers)
  2. Add a trigger that adds 1 to the count variable each time it is clicked (sequence this so it is the top trigger on your button)
  3. Add 5 triggers to the same button that show the related picture layers (1 trigger for each picture).  Add a condition to the triggers that the count variable is equal to 1 for the first pic, 2 for the second pic, 3 for the 3rd, etc..
Josh Uhlig

Where did you place the trigger?  You should select the button and then click the "create new trigger" button.  The trigger should look like this:

That should be the first trigger under your button.  Follow that trigger with the triggers that identify which image to reference:

Attached is a file that shows what I was thinking.  I added another trigger that resets the count variable to 0 once it reaches 5 so it will cycle thorugh images again.  The second slide adds additional functionality by adding states to the button  and then using aditional triggers to change the state to show which image it will show on the next click.

Hope it makes sense.