Explore the community › Forums › Lectora › Lectora Questions & Answers › Help with simple interaction, best practices example › Reply To: Help with simple interaction, best practices example
The basic problem is that nothing was triggering your Hide Prompt action at the top of the title explorer.
In the attached version, I’ve made the following changes:
- Put that action inside a group. While it might seem weird to have a “group” with just one action, it allows triggering the action with a “Run Action Group” action.
- Added an On Click > Run Action Group action to each of the buttons to run the new group.
That’s all that was strictly necessary to fix the problem, but I made one other change as well: I changed the “Add to Variable” actions to “Set Equal To” actions. This is safer when you just need to know whether a button has been clicked or not, because with an “Add to Variable” action, if the learner clicks the same button a second time, your variable equals 2 and the test fails. With a “Set Equal To” action, it doesn’t matter if the learner clicks the button once or 100 times, the variable is still 1.