Wednesday, August 8, 2012

Using Variable Flags to Provide Feedback in Adobe Captivate

by Jonathan Shoaf

Flags are common everyday objects. When a flag is raised into position, it has meaning. Flags are used as signals. The are used in races to signal caution, final laps, and victory. They are used in the Olympics to signal an athlete's country, when an athlete goes out of bounds, or commits a penalty. Flags have meaning.

When it comes to developing e-learning, flags can be very useful. Flags answer the question "was something done?" Did the learner complete this? Did the learner click here? Did the learner see the last page in section two?

Most e-learning tools, including Adobe Captivate, provide for the ability to use flags. Sometimes this is done automatically by built in variables that let the developer know things like "did the learner complete the quiz?" However, creating custom variables allows the developer to track nearly any thing in an e-learning module.

Creating a flag in Adobe Captivate is easy. First, go to Project > Variables... in the menu bar.

Next, create and name the flag by clicking Add New in the variables dialog. In the Name field, type the name of the flag. It is common convention to start off a flag variable with the prefix "f_". In this case the flag will track when the section is complete so it is named "f_section_complete". Set the Value to 0. This is important. A flag only has two states. The flag is either raised or it is not raised. The value is set to 0 to indicate it is not raised until the learner does something to make it raised. Later in the e-learning the flag will be set to 1, meaning that it has been raised. Click Save to store the variable and Close to exit the dialog.

Now that the flag is created, we need to pick a place to raise it. A flag can be raised on just about any event such as when an image is clicked on or a page is entered. In this example, the section complete flag should be raised when the last page of the section is entered by the learner. To do this, select the page. In the Properties panel go to the Action section. At the On Enter event, select Assign. Choose the variable flag "f_section_complete". Assign it with a value of 1, indicating that the flag is raised.

At this point, the flag has been created and set to raise when the last page of a section is entered. What do we do with this information? Well, that is up to you. This information can be used to do things like place a checkmark next to a completed section, give feedback to the learner, or calculate some type of score or reward. In this case, text will be shown when the flag is raised. This text might say something like "Congratulations on completing the section" or "You are now ready to review".

To do this, create an advanced action. Go to Projects > Advanced Actions... in the menu bar.

For Action Type select "Conditional Actions". For Action Name type in "check_flag_status". In the If section select the variable "f_section_status", "is equal to", and type in the literal value of 1. This is the equivalent of saying if this flag is raised, do the following actions. In this case the action Show is selected and the text to appear, Text_Caption_2, is chosen. Save and Close the Advanced Actions dialog.

To make this conditional action occur, you will perform the same procedure as when you raised the flag. Instead of choosing Assign, choose Execute Advanced Actions and choose "check_flag_status" as the Script.

A flag is a good tool to have in your development arsenal. Try experimenting with one or two flags in a project and then get more complex as you comfort level improves. The use of flags enhances the usability and feedback of an e-learning project.


  1. Hi - nice post, thanks for sharing this. I've been using Lectora and Captivate in tandem for a number of years as I've viewed them as complimentary products. Looks like at last Adobe is offering a product that can cover both types of content. Presumably you can capture quiz answers and feed back coaching comments/answers to the learner as well? What do you think - is this the killer app we've all been looking for in the wake of the Flash/HTML5 developments?

  2. This method works on Captivate 5x and presumably Captivate 6 (though I have not tried it yet). The recently released Captivate 6 is designed to address HTML5 and mobile more thoroughly than previous versions. Killer app? I've not seen any evidence of that...but each version seems to be making lots of improvements that make my job as a developer easier! :)

  3. Nice article Jonathan, easy to follow and understand.

  4. Perhaps you should have added that an advanced action doesn't release the play head, contrary to a normal action (by using the Action accordion). This is an important difference. At least if you trigger this advanced action by an event caused by an interactive object (Button, click box, TEB) and also by slide events in versions up to 5.5.
    However: the On Slide event that you are using will not stop the playhead in Captivate 6! Just a warning. Will blog about it soon.


Thank you for your comments.