Disable Next Button Until All Layers are visited

Aug 10, 2022

I'm working on a course where I need the next button to be disabled once the user has selected all of the layers.  The layers are set up to go back to the base layer once the audio has completed.  But I'm not sure how to set it up for the next button to appear once all layers have been clicked and viewed. 

Unfortunately I cannot post the project on this due NDAs...   

Any help would be greatly appreciated.  

6 Replies
Kristin Hatcher

There are a couple of ways to do this, but my preferred way is to set a true/false variable on a slide. Let's call it V (for variable). The default value for V is "False."

On the slide you set a trigger that says "Change the state of the NEXT button to disabled when the timeline starts on this slide unless variable V is TRUE."

You set an additional trigger that says "Change the state of the NEXT button to normal when variable V changes if the state of V is TRUE."

Then you set the variable to change to True once the participant views all the information. If you are just having them go from one layer to the next, then I'd set a variable on the last layer that says "Adjust variable V to TRUE when timeline starts on this layer."

Sometimes I have a slide with several buttons, and a user has to click through each button to view the layer. You could have the variable change to true once the state of all of the buttons is "visited," but in this scenario I prefer a number variable. I would add a trigger to each slide layer "Add value 1 to V when the timeline starts on this layer,"

Let's say there are 5 layers you want them to see. You set your NEXT button triggers to "Change the state of the NEXT button to disabled when the timeline starts on this slide unless variable V less than or equal to 4."

and

"Change the state of the NEXT button to normal when variable V changes if V is greater than or equal to 5."

Does this help?

James Martin

I had to implement something similar just yesterday. Here's how I went about it. I hope it helps you. 

In my case, there was a base layer with images. Clicking each of them would trigger a new layer with a video. The request was that people had to finish each video before moving on. 

I created four variables. For reasons not worth discussing, they were called varWhyA, varWhyE, varWhyM, and varWhyR. They were true/false (i.e. boolean) variables with a default value of false. 

In each of the layers containing a video (i.e. all but the base layer), there was a slide trigger which would adjust the value of the video's associated variable to true. I tried setting it to when "timeline ends" on "this layer," but it would never change the variable, so I went with setting it when "timeline starts" on "this layer." There's also an option for picking a certain point in the timeline that counts as complete. I might go back and try that. 

Then you load up your Next button (on the base layer, in the Player, or both) with some object triggers to keep users from advancing until all of the vars are true. To improve the UX, I also have a warning layer (layerProgressWarning) that appears if they hit btnNext before all the conditions are true. Of course, you could also gray it out or make it not visible:  

As an ID, I'm not a big fan of this sort of thing. I don't like learning to be a forced march. But I did like it as a problem to solve. 

When you're doing this sort of thing, add a testing text box to your slide so you can see the status of the variables. You can drag it off the stage when you're done with it, which will keep it out of frame but still available, to you, if you need to do more testing later. Mine looks like this, in the editor: 

Walt Hamilton

Edmond,

You want to be careful using the method that counts up to five. It's possible the learner could visit one layer five times, and then advance. The method James suggests is more reliable. Also, sometimes you can get away with changing the variable when the timeline starts, but if there is a way to leave the layer before it finishes, it opens the possibility that the learner can get credit for viewing only a few seconds of the layer.