401 Adobe Captivate Variables and Actions

June 24 & 25, 2010
The Rapid Development Tools Intensive:
Intermediate and Advanced Concepts and
Techniques
401
Adobe Captivate
Variables and Actions –
The Cool Stuff!
Joseph Ganci, Dazzle Technologies
The Rapid Development Tools Intensive:
Intermediate and Advanced Concepts and Techniques
June 24 & 25, 2010
Dazzle Technologies Corp.
For all your custom creative
e-learning needs!
Adobe Captivate Variables and Actions
The Cool Stuff!
Joseph Ganci
Dazzle Technologies Corp.
[email protected]
June 2010
eLearning Guild Online Forums
401 - Adobe Captivate Variables and Actions – The Cool Stuff!
Member, Adobe Captivate Advisory Board
Member, Adobe e-Learning Advisory Board
Join our free lists!
Captivate tips: email with subject line join to [email protected]
Authoring Tools tips: email with subject line join to [email protected]
e-Learning tips: email with subject line join to [email protected]
Session 401 – Adobe Captivate Variables and Actions –
The Cool Stuff! – Joseph Ganci, Dazzle Technologies
The Rapid Development Tools Intensive:
Intermediate and Advanced Concepts and Techniques
June 24 & 25, 2010
Table of Contents
Variables – The Holders of Information...........................................................................1
System Variables.........................................................................................................1
User Variables .............................................................................................................4
Creating Advanced Actions – The Performers .................................................................6
Sample Scripts.............................................................................................................6
Updating the Number of Tries on Each Question .........................................................9
Your Homework Assignment ........................................................................................12
Thank You! ...................................................................................................................12
Session 401 – Adobe Captivate Variables and Actions –
The Cool Stuff! – Joseph Ganci, Dazzle Technologies
The Rapid Development Tools Intensive:
Intermediate and Advanced Concepts and Techniques
June 24 & 25, 2010
Variables – The Holders of Information
Simply put, variables hold information. Think of them as a box into which you put a
number or a user’s name, a title of a book or the score the user received on a quiz.
Some variables you create and maintain yourself. These are called user variables. Other
variables are automatically available to you in Captivate. Those are called system
variables.
System Variables
Choose Project > Actions and choose the Variables tab in the resulting dialog. Next,
choose System from the Type drop down.
You will then see each system variable and its description.
You can filter the system variables by those associated with movies controls, move
information, movie meta data, system information or quizzing.
Session 401 – Adobe Captivate Variables and Actions –
The Cool Stuff! – Joseph Ganci, Dazzle Technologies
Page 1
The Rapid Development Tools Intensive:
Intermediate and Advanced Concepts and Techniques
June 24 & 25, 2010
Let’s see how we can use system variables to enhance our e-learning.
1. Insert a new text caption on the screen.
2. Type Page and a space.
3. Now click the button highlighted below.
4. Clicking the button will cause the following to display.
5. Scroll down until you find the variable called cpInfoCurrentSlide and click
OK. Notice that the variable name is now inserted into the text caption
with two dollar signs ($$) on either side. The dollar signs tell Captivate that
this is a variable and that it should show the value of the variable at run
time.
6. Now type a space and choose the Insert Variable button again. This time
choose the variable called cpInfoSlideCount. The result should look like
the caption below.
Session 401 – Adobe Captivate Variables and Actions –
The Cool Stuff! – Joseph Ganci, Dazzle Technologies
Page 2
The Rapid Development Tools Intensive:
Intermediate and Advanced Concepts and Techniques
June 24 & 25, 2010
Session 401 – Adobe Captivate Variables and Actions –
The Cool Stuff! – Joseph Ganci, Dazzle Technologies
Page 3
The Rapid Development Tools Intensive:
Intermediate and Advanced Concepts and Techniques
June 24 & 25, 2010
7. Placing this expression on any slide will show the learner the current slide
number and the total slide count, as in the following:
Page 2 of 12
User Variables
Let’s say that we will determine how well the learner does by comparing the number of
questions answered correctly to the total number of questions. It would be convenient to
store the number of questions in a variable at the start of our Captivate lesson so that if
we ever need add or remove questions from our file, we need to change this information
only once in our file.
Creating Our User Variable
We start by choosing Project -> Actions.
The first tab is Variables. Choose User from the Type dropdown list and click the Add
New button. Once you’ve done that, type the new variable name in the Name field. Let’s
call it NumQuestions. Once you’ve typed the name, the Add New button becomes Save.
Click it and now you can use the variable.
Session 401 – Adobe Captivate Variables and Actions –
The Cool Stuff! – Joseph Ganci, Dazzle Technologies
Page 4
The Rapid Development Tools Intensive:
Intermediate and Advanced Concepts and Techniques
June 24 & 25, 2010
Assigning a Value to Our User Variable
Now that you’ve created your variables, let’s assign our NumQuestions variable to the
number of questions in our file.
On our first slide, we choose Properties and then change what happens on Slide Enter.
As you can see, we chose Assign from the drop down menu and then chose our
NumQuestions example from the Assign drop down. Finally, we typed the value we wish
to have NumQuestions hold in the with field, 3.
We can now use NumQuestions whenever we want to create an action that needs to
determine what to do next based at least in part with how many questions are in our file.
This is an age-old technique for making your file much easier to maintain because if there
Session 401 – Adobe Captivate Variables and Actions –
Page 5
The Cool Stuff! – Joseph Ganci, Dazzle Technologies
The Rapid Development Tools Intensive:
Intermediate and Advanced Concepts and Techniques
June 24 & 25, 2010
are several places in your file where you need to remember this information, you need
only change one place in your file (the dialog above) when you need to modify the
number of questions in your file.
Creating Advanced Actions – The Performers
If variables hold information, think of actions as acting on information. Variables
contain; actions do.
1. Choose Project > Actions and choose the Advanced actions tab in the resulting
dialog. Next, choose System from the Type drop down.
2. Now drop down the Edit / Action action options and choose Create a new
action.
3. You can now create a script by double-clicking the Statement line in the box
below and choosing from the drop-down list of actions. Note that the actions here
contain those normally associated with interactions, but you have additional ones
as well. They are:
a. Show – show an object currently on the timeline that you have previously
hidden.
b. Hide – hide an object currently on the stage.
c. Enable – enable a button or other element that you have previously
disabled.
d. Disable – disable a button or other element, making it inactive.
Sample Scripts
Let’s start with a file that has three questions in it, questions that we have created
ourselves using text entry boxes, buttons and/or click boxes.
We want to keep track of whether or not the learner answers each question correctly on
the first try. If so, we will increment a score by 1 each time. At the end, we will decide if
the learner received a perfect score by comparing the score received with the number of
questions. If they are both the same, that means each question was answered correctly.
We first need to create new user variables. We will need a variable that keeps track of
how many tries the user needed on each question, so we will create three separate
variables, one for each question, and call them:
 Q1_Tries
 Q2_Tries
 Q3_Tries
Session 401 – Adobe Captivate Variables and Actions –
The Cool Stuff! – Joseph Ganci, Dazzle Technologies
Page 6
The Rapid Development Tools Intensive:
Intermediate and Advanced Concepts and Techniques
June 24 & 25, 2010
We also need to keep track of the score along the way, so we will create another user
variable:

Score
Finally, we will need to keep track of the number of questions. While we can compare
our user variable Score to the value of 3, because we have three questions, what if we
decide to later add or delete a question? It would be simpler to set a variable at the start in
which we will load the value of 3, making it easier to update later if we change the
number of questions.

NumQuestions
Assigning the Number of Questions
On the very first slide of our lesson, we will open the slide’s properties and set the
following:
Now our NumQuestions variable has been set to a value of 3.
Updating the Number of Tries on Each Question
When the learner chooses the wrong answer to a question, we need to increment the
number of tries for that question. Remember we created user variables earlier to track
this. If the user clicks a button, for instance, that is the wrong answer, we change the
option below to Multiple actions and click the button to the right.
Session 401 – Adobe Captivate Variables and Actions –
The Cool Stuff! – Joseph Ganci, Dazzle Technologies
Page 7
The Rapid Development Tools Intensive:
Intermediate and Advanced Concepts and Techniques
June 24 & 25, 2010
When we do so, we will then see this dialog. In it, we set actions so that when the user
clicks the wrong answer button, we increment the variable Q1_Tries by 1 and then jump
to the next slide, where we will present specific feedback for the wrong answer.
For each wrong answer, we do the same. For the right answer, we instead do the
following. In this script, we increment the number of tries by 1 and then we check if the
number of tries is actually equal to 1, meaning this was the first attempt to answer the
question. If it is, we increment the score by 1.
Session 401 – Adobe Captivate Variables and Actions –
The Cool Stuff! – Joseph Ganci, Dazzle Technologies
Page 8
The Rapid Development Tools Intensive:
Intermediate and Advanced Concepts and Techniques
June 24 & 25, 2010
We repeat the above process for the other questions, using the variables Q2_Tries and
Q3_Tries.
Updating the Number of Tries on Each Question
After all the questions have been answered, we will run the following script to determine
if the learner answered each question correctly. If so, we will take the learner to a
congratulations screen. If not, we will inform the learner that he or she should repeat the
lesson.
Session 401 – Adobe Captivate Variables and Actions –
The Cool Stuff! – Joseph Ganci, Dazzle Technologies
Page 9
The Rapid Development Tools Intensive:
Intermediate and Advanced Concepts and Techniques
June 24 & 25, 2010
Session 401 – Adobe Captivate Variables and Actions –
The Cool Stuff! – Joseph Ganci, Dazzle Technologies
Page 10
The Rapid Development Tools Intensive:
Intermediate and Advanced Concepts and Techniques
June 24 & 25, 2010
Using variables and actions, you have the ability to navigate in ways that are not possible
through the standard navigation options available to you.
Try your own actions and see for yourself how useful they can be!
Session 401 – Adobe Captivate Variables and Actions –
The Cool Stuff! – Joseph Ganci, Dazzle Technologies
Page 11
The Rapid Development Tools Intensive:
Intermediate and Advanced Concepts and Techniques
June 24 & 25, 2010
Your Homework Assignment
1. Experiment with other system variables and see how they may be able to enhance
your courses in the future.
2. Create your own user variables to track.
3. Create actions – be creative.
If you run into any problems or you have questions, please email me your file and
questions: [email protected]. I will try to answer within 3 business days.
Thank You!
I appreciate your attendance in my class and hope that you found it useful!
Email me your feedback and suggestions please: [email protected]
Session 401 – Adobe Captivate Variables and Actions –
The Cool Stuff! – Joseph Ganci, Dazzle Technologies
Page 12