How to Use Number Variables to Create Click Counter in ActivePresenter 9
A number variable in ActivePresenter 9 is a great solution to capture and track numeric values. This tutorial will show you how to use number variables to create a mouse click counter. That is to say, you can track how many clicks on an object.
Let’s say you have a click counter. Clicking the ‘+’ button will go up the counter by 1 and clicking the ‘-’ button will go down it by 1. When you want to reset the counter, press the Reset button.
For that to happen, check out the steps below:
Create a Number Variable for the Click Counter
You only need one variable in this example to count the number of mouse clicks. To create a number variable, you access the Home tab, then click on Variables.
In the Variables dialog, click on the green plus icon at the bottom to add a new variable, select the NUMBER type, and define its initial value if any.
After that, click Add & Close to finish.
Now the number variable is created. The next step is to create actions that calculate the number of clicks.
Assign Actions to Adjust the Variable
In this step, you need to add events-actions to make the counter work. Particularly, it’s necessary to add the Adjust Variable action to each ‘+’, ‘-’, and Reset buttons of the click counter. Firstly, you select the ‘+’ button and navigate to its Properties pane > Interactivity > Events – Actions. Then add the On Click event and the Adjust Variable action. You set to add 1 point to the number variable when clicking the ‘+’ button like this:
Similarly, you continue setting to subtract 1 point from the variable when clicking the ‘-’ button:
For the Reset button of the click counter, you set the number variable to be equal to 0:
Reference the Variable
This step is to insert a variable reference that displays the number variable value in the click counter. You can add variable references to any text caption, shape, button, or other text-based objects in ActivePresenter 9.
To insert a reference, do the following:
1. Click the text area of the counter to open the inline text editor.
2. Click the Home tab > Reference. Select the countClick variable from the dialog and click OK to finish.
3. Optionally, format the reference text the way you want.
Tip: If you remember precisely a variable name, type the name and put it between the % signs to reference that variable.
At this point, each time you click one of the three buttons, the reference will update accordingly.
That’s it! So easy to use number variables to capture and track numeric values in a click counter with ActivePresenter 9. Hope that this inspires you to build rich interactive eLearning courses with ActivePresenter.
See also: