Assign layer to trigger based on a variable

Oct 20, 2016

Hi all, did a search and couldn't find anything for what I am trying to do. 

I have a navigation button (next) that is set to show a layer when a user clicks on it. Currently I have the button on each layer, and with a trigger to manually set to show the next layer. 

What I want to be able to do is have a variable determine what layer is shown when the button is clicked. For example:

  1. A variable exists called "NextLayerNumber" that is currently set to 1
  2. Click "Start" button 
    1. Layer 1 is show
    2. Variable "NextLayerNumber" is updated to 2 through a Layer Trigger
    3. "Start" button goes away and a navigation layer with the "Next" button is shown.
  3. Click "Next" button
    1. Trigger looks at "NextLayerNumber" sees it set to 2
    2. Shows Layer 2
      1. Variable "NextLayerNumber" is updated to 3 through a Layer Trigger
  4. Click "Next" button
    1. Trigger looks at "NextLayerNumber" sees it set to 3
    2. Shows Layer 2
      1. Variable "NextLayerNumber" is updated to 4 through a Layer Trigger

And so on... ... ... ...

The reasoning for this is that I can create a template for our designers to use, where they just have to duplicate a layer, edit whats on the layer, and forget about it. Instead of duplicating a layer, and then adjusting the trigger on the button manually. 

I hope that I was able to explain that well. Anyone has seen anything like this done in the past or knows a way to accomplish this? I've thought of utilizing JavaScript, but dont know of a way to manipulate a button trigger through it, or to show/hide layers through JavaScript.

Thanks to all in advance,

Roman

4 Replies
Roman Stotland

Thanks for the reply Michael, I haven't really figured out how to accomplish this without manually setting the button trigger.

Instead of having it set to "show layer 'layer 2' when user clicks" i need the 'layer 2' part to be set by the variable when a layer is viewed. 

I basically want the trigger on the "Next" button to look at the variable and advance to whatever layer corresponds to the value of the variable, but do this without manually setting conditions.

Thanks 

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