“Let us assume that the speed of the vehicle is x km/hr.”
Remember the Math Classes in School? We often use such assumptions to solve Math problems. Here, we are using a variable called x. It is assigned to a value which we are about to find out. All we know is that the variable will have a numerical value (since it is the speed of a vehicle, it cannot be text or characters).
Similarly, a variable in Captivate will have a name (x) and a type associated with it (numerical, text, character, etc). There are two types of variables in Captivate – User & System.
User Variables are created by the Captivate users whereas System Variables are already available in the system. These variables can be used in your Captivate projects to create some advanced interactions and for some interesting displays. We will analyze the system variables first.
Before we proceed, let us first look at the details of a Captivate system variable.
cpCmndCC is a Captivate System Variable, which has a default value 0 (zero). Its description is “Enable/disable closed captioning (CC). Set value to 1 to display closed captions”. So the System Variable cpCmndCC is assigned a value which is equal to the status of the display of closed captions. When closed captions are enabled, the value of cpCmndCC is 1 and when it is disabled, its value is 0. To put it in another way, if we set the value of cpCmndCC to 1, the system will enable closed captioning in your output. You can use this if your course requires closed captioning only in some slides. Even better, you can ask the learners to decide whether they need closed captioning or not. All you have to do is, ask the learners to click on a button, if they require closed captioning. And then assign an action to the button, to change the value of the variable cpCmndCC to 1. (Of course assigning an action is a different process which we will review in another article.) This is just a basic example of how you can use a system variable.
In Captivate 4, press Shift+F9 or choose Project – Actions, and select Variables tab on top.
From the Type menu, choose System.
By default, all the system variables will be listed. However, you can filter them based on the categories available in the View By menu. Choose Movie Control from the menu. You will see the variable we discussed above – cpCmndCC. The value and description is also available for each system variable. Select the different system variables and read its description to get an idea of the value it will return.
Display the Variables (read values of Variables) in Captivate Project
Some of the system variables might be useful to display in your captivate project. Like the cpInfoCurrentDateString variable, returns the date as set on the user’s computer. Let us see the syntax to display this variable in your Captivate project slide. Insert a text caption in your slide and type in as shown below:
$$cpInfoCurrentDateString$$
$$variable$$ is the syntax to display a variable in Captivate project slide. If you would like to add any normal text along with it, type them outside the $$ symbols, e.g.
Date: $$cpInfoCurrentDateString$$ or $$cpInfoCurrentDateString$$ is the last date to submit your entry
Now, we will look at the User defined variables in Captivate. From the Actions Dialog window, select the Variables tab. Make sure that the Type menu is showing User variables. Click on Add New. The Name, Value and Description fields become editable and you can now add the details. Give variable name as b, value as 1 and a description of your choice.
That’s it, you have successfully created a user defined variable. Now you have display the value of this variable too using the syntax mentioned above. To make maximum utilization of the variable, you must also know about the Advanced Actions in Captivate. We will review this in detail in the next article.