The procedures in this document require you to use assets such as images and sample Adobe Captivate project files. You can choose to use your own assets and samples. However, it is recommended that you download and extract the following zip file to your computer:
Before explaining Advanced Actions, some basic concepts which are useful to understand Advanced Actions are covered.
Literals are fixed values. A literal can be either an alphanumeric value, or it can be a number. For example, in real life, John, Sarah, 100 are literals as they are fixed values.
And, for a string literal, like “John”, if you use it with any function in conventional programming, the value of the literal changes. If you want to reverse the literal above, use “John”.reverse().
Variables are entities whose values can change. For example, in real life, if 'color' is considered a variable, red, blue, and green are some of the values logically associated with that variable. So variables can be considered as placeholders for different values.
Variables in Captivate can be classified into system variables and user variables. Following is a brief description of them.
System variables are pre-defined variables in Captivate.
- cpInfoCurrentDate is a system variable which shows the current date that is set on the user's computer.
- cpInfoAuthor returns the name of the author as specified in the properties of the project (File > Project Info).
User variables are defined by the user. These variables can also be made to accept a set of values, and reject the other entries.
For example, you can define a variable 'fruit' to accept fruits as values. You can also restrict the values accepted by the 'fruit' variable by specifying that the entries be one of apples, oranges, grapes, or bananas. This helps you in collecting values in the variable which are of interest to you.
When you add a Text Entry Box to the slide, Captivate automatically assigns a variable to it.
To learn more on variables, see the article Adobe Captivate variables.
You can create user variables in your Captivate project by choosing Variables in the Project menu. This opens up the Variables dialog box. To create a new user variable, click open Add New to the right of Type drop-down box. It's a good practice to name the variables in a way which helps you identify its function later on. You can also enter an initial value to the variable in the Value field.
In Captivate, system variables cannot be modified or deleted, and user variable names cannot be changed once created.
The name you assign to a user variable must not conflict with Captivate’s internal functions, reserved keywords, exposed system variables, or other hidden variables.
There are some conventions while naming a variable. They are:
- Do not begin the name with a blank or a digit.
Example: Naming variables as 1Name, _Name is a bad practice.
- Do not use any reserved keywords.
For example, avoid using the keywords like: class, while, case, float.
- Use unique variable names.
Example: MyVar1, MyVar2
- Use intuitive names for a variable.
Example: Input_Name, Display_Education
- Always add descriptions to a variable.
Example: Input_Name variable accepts name entered by the candidates.
To see the list of reserved keywords in Captivate, see the article How to create user-defined variables in Adobe Captivate.
An Advanced Action allows you to execute an action when an event is triggered, or when a condition or set of conditions are met.
To open Advanced Actions, go to Project menu, Advanced Actions. You get the user interface shown below.
|1||Name of the action.|
|4||Choose an existing action.
|5||Preview the structure of the action.
|6||Create an action.
|7||Import a shared action.
|8||Export a shared action.|
|9||Delete an action.|
|10||Duplicate an action.
|11||Add an action item.|
|12||Delete an action item.
|13||Copy an action item.
|20||Add a decision.
|21||Remove a decision.|
|22||Duplicate a decision.|
As an example, implement a Standard action to welcome the users when they enter their name in the course you create.
The second text caption added to the slide in the previous step will be used to call the variable Candidate_Name to display the name entered by the user. Click into the text caption to enable the Insert variable [X] button in the Properties Inspector, Properties tab, Character section under Style.
In the Insert Variable dialog box, select the variable Candidate_Name against the Variables drop-down list.
When you do this step, the default text caption changes to $$Candidate_Name$$ to denote that the Candidate_Name variable is called from this text caption.
You can also call the variable by directly changing the text of the caption to the variable name and preceding and succeeding it by $$. But best practice to call the variable is by clicking the [X] icon and opening the Insert Variable dialog box as this allows you to control the maximum length of the variable value to be displayed.
Conditional actions, as the name suggests, are executed only when a condition or set of conditions are met.
Check the Conditional Tab in the Advanced Actions dialog box to set the condition and the corresponding action.
If..else logic is:
- If a condition or set of conditions are met, execute an action.
- Else (if the condition or conditions are not met) execute another action.
As an example, you can set up a conditional action to display a text caption to welcome a candidate if their age is greater than 15, and to display a deny-entry caption otherwise.
While logic is a conditional loop that evaluates a condition at the beginning of a statement, and continues to loop a set of actions until the condition or set of conditions is true or false.
As an example, you can set a criterion for an eLearning course eligibility that while the candidate is a graduate and their experience is greater than or equal to 5 years, accept the candidate.
This project implements conditional actions to share some interesting information about the planets in our solar system.
Add three text captions and a text entry box to the first content slide.
- Rename the three text captions as Know your planets, Enter the name of a planet below to get some interesting information, and Check the spelling and try again! respectively.
- Make the caption Check the spelling/case and try again! invisible during runtime by using the eye icon next to its name under the Properties tab of Properties Inspector.
- Select the text entry box, go to Properties Inspector, Properties tab, Style section, and deselect Retain Text.
- Also, click More Options below Retain Text and select Allow All.
- Click the [X] icon under Variable and create a variable named Input_Planet for readability.
- Also, add the image of the solar system to this slide given to you.
- Resize and reorient the elements. You can also format the text captions for visual appeal (see the image below).
In the second slide, add a rectangle from the Shapes menu, a text caption from the Text menu, and a button from the Interactions menu.
- Change the opacity of the rectangle to 0%. To change it, go to the Properties Inspector, Properties tab, Style section, Fill.
- Enlarge the rectangle into a border for the slide.
- Move the button to the upper-right corner of the border. This button will act as the close button.
- Change the caption of the button to X to denote the closing symbol. To change it, go to the Properties Inspector, Properties tab, Style section, Caption.
- Also, for the button, in the Actions section in the Properties tab, select On Success as Jump to slide and the Slide as 1 slide 1.
- Add the image of Mercury given to you, to the slide.
- Add the facts about Mercury from the Planets.docx document given to you, into the text caption.
- Rename the image as Image_Mercury, text caption as Text_Mercury, and the rectangle border as Border_Mercury for readability.
- Align all the elements you added to the slide. (See the image below).
- Select this slide in the Filmstrip and in the Properties Inspector, Properties tab, Actions section, choose On Enter as Hide Playbar.
Create a condition that if the users enter a planet name, they are taken to the slide which contains that planet's information. And if they enter the spelling incorrectly or doesn't start the name in uppercase, an error message is displayed.
To achieve this logic, an Advanced Action has to be set up for the text entry box added to the first slide.
- Go to the first slide and select the text entry box.
- In the Properties Inspector, Properties tab, Actions section, select On Success as Execute Advanced Actions.
- Against the Script drop-down below Execute Advanced Actions, click the folder icon. The Advanced Actions dialog box opens up.
- In the Advanced Actions dialog box, check the Conditional Tab.
- Enter the IF condition, and the corresponding action. In this case, if the user enters Mercury, jump to the second slide. (See the first image below in this step)
- Similarly, set up the condition and the corresponding actions for the other planets in separate tabs Untitled-1 to Untitled-8. By default only three tabs are present; so manually add more tabs.
- In the ninth tab, enter the condition to display the error message. The logic is that if none of the planet names are entered correctly, or if the name doesn't start in uppercase, an error has to be displayed. Also add a second action in this tab to jump to slide 1; this automatically refreshes the Submit button during runtime. (See the second image below in this step).
Select the first slide in the Filmstrip, go to Properties Inspector, Properties tab, Actions section, and select On Enter as Hide. In the Hide drop-down, select the text caption which contains the error message. This removes the error message when the user enters the first slide for exploring more planets, after a sequence of bad and successful attempts.
In this example, when you click a button an object disappears, and reappears when you click the button again.
Perform the following steps:
If you want to use an Advanced Action in other parts of the same project, or in a different project, you can save it as a Shared Action.
For example, as an eLearning author, you have to repeatedly use an Advanced Action to welcome the candidates to the courses you create. Let's save the Advanced Action created in the section Standard Actions as a Shared Action and open it in a new project.
In the dialog box, name this Shared Action as SharedAction_Show_Name. You can see that all the elements involved in AdvAction_Show_Name show up under Parameter Values. Enter a description against each parameter to identify its function. Description is important to understand the purpose of these parameters when you use them later. Also give a description to the Shared Action. Save the Action (see the image below).
For more information on Advanced Actions, see the article Advanced actions in Adobe Captivate.