hide/show button
July 8, 2008 12:00 AM
If this is not part of a question, then you can assign variables to each action. Let's pretend you have three boxes named Box1, Box2, and Box3. You can assign each box its own variable, called varBox1, varBox2, and varBox3. The names of the variables are unimportant, as long as they mean something to you. You can define these from the Tools menu and Manage Variables. Be sure to give the variables an initial value of 0.Whenever you load a page with these boxes, create a series of actions at the page level.On Show, Modify Variable, varBox1 Set to 0Do the same thing for all of these variables.Assign an action to Box1. This action would be...On Click, Modify Variable, varBox1 Set to 1Do the same thing for the other variables.Create a new Action Group (call it Check Variables). Include an action that would show the Next button if the variables equal 1. Show, Next Button, IF varBox1 = 1 AND varBox2 = 1 AND varBox3 = 1Assign another action to each of Box1, Box2, and Box3. This action would be...On Click, Run Action Group, Check Variables.The end result is that the Next button remains hidden. Every time a box is checked, the variable associated with that box is updated to be 1. Lectora then checks to see if all the variables equal 1. If so, then it shows the Next button. If any one of the variables is not equal to 1 (for example, Box3 has not been clicked yet), then the button stays hidden. The reason for setting all of the variables equal to 0 at the beginning of a page is so you can reuse those variables for another page. Although, if you want to show the Next button immediately for someone returning to the course, then you may want to omit this step and instead focus on having the variables retain their values between sessions. This mimics a "save" feature.Kevin
Discussions have been disabled for this post