Making Next Button Appear After Minimum Number Correct Clicks
July 29, 2022 12:00 AM
I am working on a Lectora title that has an interactivity that includes about 11 transparent buttons over an image. The user is supposed to identify everything that is wrong with the image by clicking on the area that is incorrect (transparent button). Each mouse click is set up with feedback and will indicate whether the click was correct or incorrect. I have the Next button properties set to initially hidden. I want the Next Button to show once the user clicks on all of the incorrect transparent buttons. I have set up modified variables a couple of different ways, but I can't get the Next button to show after clicking on all the incorrect buttons.
I first created a modified variable for each incorrect button: On Mouse Click, Target is the incorrect button, Set Equal to 1. Then on the next button I created an action: On Page show, Show Next Button If all Conditions are True. I have all incorrect variables listed in the table individually with a relationship of " greater than or equal" 1. I am sure the problem has to do with my trigger being On Page show, but I can't figure out how to correct it.
The other method I used was to Create a variable for the page set equal to 0. Then for each incorrect answer I created a modified variable for the page variable to Add 1. Then I created yet another modified variable for each transparent button: On Mouse Click, show next if (all conditions are true) the page variable is greater than or equal (the number of incorrect buttons). This isn't working either and I feel like it should.
I appreciate any help. Thank You!
Solution
Hi @lhinterweger2536.
For pages like this I do something very similar to your second method but instead of adding 1 to the page variable I append unique letters for each button.
Try the following:
1. Create a single variable (i.e. _incorrectSelected). Leave the initial value as "0".
2. On each of your transparant buttons create the following 2 actions:
Target: _incorrectSelected
Type: Add to Variable
Value: a [b,c - use a different letter on each button]
On Mouse Click Show Next if ALL conditions are true
_incorrectSelected contains a
_incorrectSelected contains b
etc
3. Remember that the order of the actions matters so be sure that the modify variable is the first one listed, then the show next follows that.
Hope this helps!
Susan
Discussion (4)
Hi @lhinterweger2536.
For pages like this I do something very similar to your second method but instead of adding 1 to the page variable I append unique letters for each button.
Try the following:
1. Create a single variable (i.e. _incorrectSelected). Leave the initial value as "0".
2. On each of your transparant buttons create the following 2 actions:
Target: _incorrectSelected
Type: Add to Variable
Value: a [b,c - use a different letter on each button]
On Mouse Click Show Next if ALL conditions are true
_incorrectSelected contains a
_incorrectSelected contains b
etc
3. Remember that the order of the actions matters so be sure that the modify variable is the first one listed, then the show next follows that.
Hope this helps!
Susan
Your second method sounds about right, but it's hard to tell without being able to play with it.
Can you upload a cut-down course with just that page? You can even remove the image (leaving only the buttons) if it's proprietary info.
Glad to hear that @lhinterweger2536!
It may seem tedious at first but once you've done it a few times it will get quicker.
Thank you so much for the help! I used Susan's method and it worked!