Explore the community Forums Lectora Lectora Questions & Answers Very Simple guide to using variables Reply To: Very Simple guide to using variables

#369363 Score: 1
Profile photo of Stan Miller
Stan Miller
LUC16 Attendee
wise owl
curious george
friend finder
LUC17 Attendee
38 pts

Pip, see if this gets you started:

Create Your Variables

  1. On the Tools tab, click Variables.
  2. Click Add.
  3. In the Variable Name box, type a name for your variable. The name can be any combination of letters and numbers, plus _. For this example, create a variable called Button1Clicked.
  4. In the Initial Value box, type False.
  5. Check the box labeled Retain variable value between sessions.
  6. Click OK.
  7. Repeat steps 2-6 to add variables called Button2Clicked and Button3Clicked.
  8. Click Close.

Assign Actions to Your Buttons

  1. Click the action for your first button. (If it doesn’t have an action yet, add one.)
  2. Click the Action tab.
  3. Be sure the Trigger is set to Mouse Click.
  4. Click No Action (or whatever action is already assigned in the Action and Target group) and then click Modify Variable from the menu that appears. You’ll see three text boxes appear next to what is now a Modify Variable button on the ribbon.
  5. In the Target box, click Button1Clicked.
  6. Be sure the Type box says Set Equal To.
  7. In the Value box, type True.
  8. Repeat steps 1-7 for your second and third buttons.

Controlling the Next Button

There are a couple of choices here. You can set the Next button to initially hidden and then show it, or you can disable it and then enable it. For this example, I’ll assume you’ve set it to initially hidden.

  1. Click your first button again.
  2. Add a second action to it.
  3. Be sure the Trigger is set to Mouse Click.
  4. Click No Action and then click Show. You’ll see one box appear beside the Show button.
  5. In that Target box, click your Next button.
  6. Click Always. You will see a pop-up screen called Set Action Conditions. There are three columns in this box, labeled Variable, Relationship and Value.
  7. On the first row, in the Variable column, pick Button1Clicked.
  8. On the first row, in the Relationship column, pick Equal To.
  9. On the first row, in the Value column, type True.
  10. Repeat steps 7-9 on the second row for the Button2Clicked variable.
  11. Repeat steps 7-9 on the third row for the Button3Clicked variable.
  12. Be sure the box above the Variable column says All conditions must be true.
  13. Click OK.
  14. Copy this new action to your second and third buttons.

You’re done! Each time a learner clicks one of your buttons, the variable for that button will be set to True, and if all three variables are set to True then the Next button will appear.

Hope that helps!


This post has received 1 vote up.
  • This reply was modified 3 years ago by Profile photo of Stan Miller Stan Miller. Reason: Cleaning up some bad formatting