Advanced Actions are a key feature that sets Adobe Captivate apart from most other authoring tools, allowing e-learning authors to create highly interactive learning experiences. In combination with Captivate's interactive objects and run-time events, advanced actions allow you to add dynamic interactivity and logic to e-learning content so that it responds to actions taken by participants. In short, advanced actions can make your content come alive!
The term "Advanced Actions" in Adobe Captivate covers all of the following types:
- Single actions - The simplest type, where only one action can be executed by any single run-time event. (Covered in this article.)
- Standard actions - That allow any number of single actions to be sequentially executed by a single run-time event.
- Conditional actions - The most complex type. These allow groups of actions to be executed depending on whether or not specific conditions are met.
- Shared actions - These allow standard or conditional actions to be saved in a format that allow them to be exported from one Captivate project and imported into another.
In this article I only explain the simplest action type. In the Captivate interface they are just referred to generically as "actions". But I'm using the term "Single Actions" here to clearly differentiate them from the other more complex actions types that will be covered in other articles in this series.
About Single Actions
As their name implies, you can only execute these actions one at a time using run-time events to create simple interactions. However, don't underestimate their power. Single actions can be grouped together and executed sequentially (within Standard Actions) or selectively (within Conditional Actions) to create incredibly complex interactions.
When you encounter a drop-down list of actions that can be executed by a given run-time event, you will usually see an imposing list something like the one shown at right.
Let’s take a closer look at each specific action to see how they may be useful in an e-learning context. In most cases the name gives a good idea about what the action does but there are often subtle nuances about the way they work.
Note that the actions listed below are shown in the same sort order they appear listed in the drop-down menus (which is very obviously not done alphabetically). The list at right is from Captivate 7.0.1; the current version at time of writing. Be warned that some actions will not be available in your particular Captivate version.
As its name suggests, this action simply tells the timeline to continue playing. You may need to use this if the timeline has been paused by another action.
This is the default action for On Enter slide events and up until Captivate 5.5 it was also the default On Success action for buttons and click boxes. (As of Captivate 6 the default has now changed to Go to the Next Slide.)
This action jumps back to the first frame of the previous slide in Captivate’s internal slide order. This will be the current slide number minus 1.
Note that this is not necessarily the last slide you visited because you may have jumped to the current slide from a slide somewhere else in the project entirely.
This action jumps playback to the first frame of the next slide in the order. This will be the current slide number plus 1. Since Captivate 5.5 this has been the default On Success action for buttons and click boxes.
Captivate remembers the number of the last slide you visited prior to the current one and you can use this action to jump back to that slide. This works in much the same way as a browser Back button, but only for one jump. So if you jumped from slide 10 to slide 20, executing this action would jump you back to slide 10 again. However, since Captivate does not remember your history beyond one jump, if you were to execute this same action again, then it will jump you to slide 20 again. You would just bounce between the last two slides forever.
This action was added in Captivate 6 as part of a quizzing enhancement called Remediation. It’s actually a bit too complex to explain here. So, I recommend you study any information you can find online about setting up remediation in normal and quiz slides.
This action is dead simple. You just select a slide by number or by name to jump to. One limitation is that you will not find your current slide listed. So you cannot use this action to replay the current slide. But there is a way around this. You can create a standard action that points to this specific slide and execute it via some interactive object on the current slide. This workaround will allow you to replay the current slide at any time.
This action is very popular with e-learning developers because it allows you to create what is effectively a hyperlink to another web URL or even a file on your local hard-drive or network LAN. However, it’s also one of the actions that accounts for a lot of support calls because many Captivate authors do not understand its inherent limitations.
One of the most common calls for help on the Adobe Captivate Forum is from newbie developers creating their first e-learning project who find the Open URL or File action to be inoperable. Nine times out of ten the issue is that they have not set up the published folder location as a trusted location in Flash Global Security. I explained these types of issues at length in my other e-books about Troubleshooting Adobe Captivate. However, if you don’t have that book, I’ve included some of the same information here on this page from my website about Setting Up Flash Global Security for Captivate. If you intend using Open URL or File actions in your projects then I suggest you study that information well. Otherwise you may be in for a rough ride.
Specifying a new browser window
One of the other little peculiarities with this action is that when you specify the URL to be called, you also need to specify in what browser window it will open.
By default Captivate will use the Current window, which would mean opening the URL would jump your user away from the e-learning module. If you are using a SCORM-compliant LMS this would likely sever the communication link with your course and result in loss of scoring data with unhappy users and clients all round.
As the screenshot above shows, Adobe has kindly provided a way to specify that the link should open in a different window (New, Parent, or Top), but most Captivate authors don’t know about this feature because it’s hidden underneath an insignificant-looking down-ward pointing arrow beside the URL field.
Continue Playing the Project
Also take care to note the option right at the bottom of the screenshot to Continue Playing the Project. This only becomes enabled once you select anything other than the Current window as the target. Beware of this option because it’s easy to miss the fact that it gets selected by default when you choose a new target window. There is a downside to allowing this to happen.
If your course continues playing while your learner is viewing content in a different window then they will likely miss seeing something important. If you deselect this option then your course content will be paused while the learner views the content in the new browser window that opens for them. Once they finish with that, they can return to your course and click the Play button on the playbar to continue.
Linked files need to be placed inside the published folder
When using this action to open a file (as opposed to a URL) many authors expect that Captivate will magically place the linked file inside the published folder for them. They may think this because that’s exactly what it does when you insert Event Video files. However, unfortunately it doesn’t do the same with ordinary files. So the best method to ensure your links work after publishing is to manually place the file inside the same folder where the published SWF files will reside. If you do this then all you need to specify as the link to the file is its filename. Nothing more required.
This one is a bit misleading and I personally recommend you avoid using it entirely for that reason. It supposedly allows you to create a link to another Captivate project. In fact, when you select this action the Project drop-down menu underneath list names of recent CPTX files you have opened. However, when you select one of these projects as the link target, what you are actually linking to is not the CPTX file, but the HTM file of that project’s published output. Confused already?
It actually makes sense if you think about it, because what would be the sense of creating a direct link to the CPTX project file in an e-learning lesson intended for end users that do not have the Captivate application on their system? Since you are actually linking to an HTM file anyway, I personally see little point in using this action. I prefer to use Open URL or File instead.
Captivate authors can often be seen posting questions on the forums asking how to send an automated email from an e-learning lesson, usually with some kind of quiz scoring information attached. While the name of the Send email to action might seem to suggest it offers a solution the truth is (as usual) somewhat different.
All this action really does is spawn a new email item in your end user’s email client software by calling a mailto: link. So if your end user has MS Outlook and they click a button with this action set to be executed, then they will see a new blank Outlook email item open. That’s it. Nothing more. The end user would still need to complete the email and click the Send button. There’s no way with default Captivate functionality to avoid the end user seeing what the email says.
Using parameters in the email address
On a brighter note, it is actually possible to at least save the end user some work by pre-populating the Subject line of the email with some text. To do this you just need to add a parameter to the end of the email address you type into the Address field in Captivate. So for example if the email address you need to send to is: email@example.com and you want the subject line to be: About this e-learning course, then here is what you would need to type into the Address field:
The %20 characters placed in between the words in the subject line are magically replaced by spaces when the new email opens.
But that’s not the limit of what you can do. If you also wanted to specify some body text to populate the email in addition to the subject line then all you need to do is add an ampersand at the end of the address shown above and another parameter. So it might finally look something like this:
When the new email opens, this is what it would look like:
There’s quite a lot more you can do with email links. If you want to delve into this area, I recommend you read this web page.
Here are some limitations:
- Your code is not actually being executed in the Captivate SWF file but rather in the HTM file that is used to launch the SWF. So if you only launch the SWF directly in a browser, then the JS code will not work no matter what you do.
- If your content is going to be played from your local hard drive or LAN server then the JS code will not work unless you have the published folder is set up as a trusted location in your Flash Global Security settings. If you’re unsure about this, see the page on my website about Setting Up Flash Global Security for Captivate.
This was added in Captivate 7.0. It will be disabled in the drop-down list unless you have at least one Shared Action created in your project. (For more information, see the article on Using Shared Actions.)
First added in Captivate 6, this action allows you to trigger playback of an audio file. You cannot select an audio file currently residing in the project file Library, or alternatively, import sound files that reside in some folder on your hard drive or networked LAN drive and add them to the Audio folder in the Library.
Also take special note of the drop-down arrow at the end of the Audio file field. The option here, selected by default, will mean that the slide playback is paused for the duration of the audio playback and then resume afterward. If the audio file is lengthy, it makes sense to use this option. However, if the clip is merely a brief sound, such as a pop or a click used as a sound effect or feedback, then it is probably unnecessary to pause playback.
Another little wrinkle you need to be aware of is that if you set up multiple interactive objects on a slide to trigger audio, then each one will terminate any audio initiated by other Play Audio actions.
Following on from the previous action, this one allows you to terminate playback of a currently active audio clip, as long as that audio clip was initiated by the Play Audio action. You don’t need to select which audio clip to terminate because, as mentioned above, there can only be one audio clip playing as a result of a Play Audio action. This action has no effect whatsoever on background audio, slide-level audio, or object-level audio.
This action, along with its sibling Hide action below, will likely end up being one you use more than any other. If you deselect the Properties tab > Visible in output setting of a slide object, then it will be published with the project but simply not visible at run-time. You can use the Show action to make the object visible in response to some learner interaction, such as clicking a button or getting a correct answer to a question. Logically, you can only Show an object if it’s already hidden, and you can only effectively Show objects on the slide you are currently viewing.
This is the opposite number for the Show action above. It basically just sets any slide object’s visibility to OFF, thus hiding it from view. The object is still there on the slide but not visible to the user.
Don’t underestimate the power of these simple Show/Hide actions. They open up enormous creative possibilities because they give you the power to change the entire appearance of any slide at run-time. They’re very cool!
The Enable and Disable actions work in a similar way to Show and Hide, except that these two can be used to enable or disable interactive objects such as buttons, click boxes, Smart Shapes, etc. Again, before you can enable an object, it must be currently disabled. That’s where the next action comes in.
Use this action to disable an interactive object so that it can no longer execute actions. This action can be reversed by the Enable action. The ability to enable or disable objects at runtime is very handy because it allows you to create scenarios where some things become inoperable (even though still visible) in response to user interaction. It’s basically like turning something on or off. Additionally, you can pair these actions with Show/Hide actions for even more powerful effects because then you can even change the appearance of the object being enabled or disabled.
One small caveat: The Enable/Disable actions have no effect on interactive widgets or quiz question slides. Just in case you were wondering…
This is another action that you are likely to use in almost any interaction you create. It’s the action that allows you to change the value of a variable. In most cases you will be assigning the value of a user variable, but there are a handful of system variables that are not READ-ONLY and can also be changed. (For a full list of system variables see the appendix and the end of my e-book Guide to Adobe Captivate Advanced Actions.)
Assigning with variables or literals
Variable assignment requires that you use either another variable, or a literal (an actual number or text string). These are the only two choices and you select them from the drop-down that appears whenever you choose assign as the action you intend to perform. It works the same whether you are assigning a variable from a single action, a standard action, or a conditional action (as shown below).
You can to assign a variable with the value one of the system variables that appear in the drop-down list. However, it’s more likely you’ll be using another user variable instead. For example in the screenshot below, the ErrorMessages variable is being assigned with the value of another user variable that contains the default error message text for invalid data.
Your other choice is to assign the variable with a literal, i.e. an entered number or a string of text characters. For example, instead of using a variable as shown above, you could just type in the error message as a literal text string. (Captivate automatically surrounds multiple words or phrases with double quotation marks to preserve the spaces between the words.)
Which is better, assign with a variable or a literal?
In most cases I recommend you should try to use a variable. Every time you find yourself typing in literal values, stop and think about whether or not you’ll be doing this more than once. If there’s a good likelihood you’ll need this same text somewhere else in your project to assign another variable or display on screen, then you are almost certainly well-advised to create a new user variable holding the literal text as its default value. Then you can just use this variable anytime and anywhere you want. The other advantage of this approach is that if you discover that you really need to change the variable text, all you need to do is open up the Variables dialog and change it once there. You do not need to remember everywhere you may have used this text in your project. Captivate CPTX files can easily handle hundreds of user variables if you need that many.
This action performs some simple math on the value of a numeric variable, to increment or increase it by whatever number you specify.
This is the opposite number for the Increment action. It decreases the value of a numeric variable by whatever number you specify.
For example, in the screenshot at right the On Success event will decrement or decrease the value of MyVariable by 5.
Note that Increment and Decrement actions will not have any effect if applied to a variable assigned with a text string instead of a number. If you try to Increment or Decrement a string variable, all that will happen is that your number will be applied as if it were a character. This won’t compute, so your variable will likely show a NaN error. (NaN is short for Not a Number). Since Captivate variables are not strongly typed to prevent being assigned invalid values, it’s left up to you (the designer) to ensure this kind of foolishness doesn’t occur.
This action simply pauses the timeline, but as far as I can see from my own testing, it only seems to allow you to do it once per interactive object, even if the playhead is still in the active portion of that object on the timeline. This is a bit weird and pretty much makes this action something of a "one trick pony" that is little more than useless.
If you want a way to pause the playhead at any point on the timeline, you would be better off setting up a standard or conditional action that assigns the value of the cpCmndPause system variable to 1 and then use an event to execute this action. You can then use another event (or execute a different action) to trigger the Continue action. This setup will give you unlimited control over pausing or playing the timeline.
This action was added in Captivate 7.0.1 to supposedly address issues with closing down playing windows at run-time. This has been an area of loud complaint in the Captivate User Forums for some years now. The action does appear to work, and will even close individual browser tabs, but in most browsers you will still get a message box like the one at right asking you to confirm the action being taken.
Exiting LMS SCORM Players
This action may still not address issues in all cases, especially where content is playing from an LMS SCORM Player. These players often make use of framesets and the Captivate content may be buried one or more layers deep down in the browser architecture. In such cases an Exit action needs to specify the exact child level at which the user’s browser is displaying the content, otherwise it may not be able to close the window.
It’s not usually a good idea in a SCORM setting to try and close the content window anyway because this may mess with the communication that needs to happen between the course module and the LMS to transmit and receive data about the user’s assessment score and other interactions.
This action allows you to modify a screen object by applying one of the Effects available within Captivate. You need to select the object (by Item Name) to which the Effect will be added and then click the box at far right with the ellipsis (...) to finally choose the effect to be applied.
If you have defined and saved any custom effects then you can specify them to be applied once you are into the Effects dialog.
This action is a real timesaver for e-learning authors. Even though creating a toggle button wasn’t really all that difficult with any version of Captivate, it still required using at least a standard or conditional action. The way this action works is that you just need to select the name of a user variable, the value of which will be toggled between 0 and 1. If the starting value of the variable is a string, this will be immediately set to 0 on the first execution of the Toggle action. From then on every time the action is executed the value will alternate between 0 and 1.
If you’re wondering whether or not this can be used to toggle the value of system variables, the answer is yes. However, you’ll find that most system variables are READ-ONLY, and of the ones that can be assigned by actions, none of them appear for selection in the Variables drop-down of the Properties tab. So you’ll need to resort to using a standard or conditional action to access those variables with a toggle action.
As with all single actions, you need to remember that the default behavior after executing the action is to un-pause the playhead and if you want the playhead to continue paused then you really need to set up a standard or conditional action instead. With the Toggle action this is likely to be your best option because in most cases you’ll probably want to allow the user to use the action repeatedly while remaining on the same slide.
This action simply expands an Overlay TOC. It works in exactly the same way as setting the system variable cpCmndTOCVisible to 1. (See also Hide TOC.)
This action restores a playbar that has been recently hidden by assigning the cpCmndShowPlaybar system variable to 0. Please note that it will not magically give you a playbar if you haven’t already set one up in Edit mode. (See also Hide Playbar.)
This action collapses an expanded Overlay TOC so that it disappears from view. It basically sets the system variable cpCmndTOCVisible to 0. (See also Show TOC.)
This will make the playbar disappear by assigning the cpCmndShowPlaybar system variable to 0. (See also Show Playbar.)
This action sets the value of the cpLockTOC system variable to 1 which then disables user interaction with the TOC. This means that although the TOC is still visible to the user, it will not respond to clicks. Unfortunately, there’s no visible indication to the user that this is the case, which can result in some potential frustration when all of a sudden the TOC stops working. So I recommend that if you do use this or any other action to lock the TOC then you should also have some caption or image on screen to clue the user into this change of circumstances. (See also Unlock TOC.)
And finally for those times when you want nothing to happen when an event is registered you can set it to No Action. In Captivate 5.0 the default On Exit event for slides was Go to next slide. But this was changed in Captivate 5.5 and later versions to be No action. The slides still progress as normal.
By the way, this article is an excerpt from my: Infosemantics Guide to Adobe Captivate Advanced Actions e-book. Not only does this book offer more than 200 pages of essential information for Captivate developers, it also comes with the actual CPTX files I used for screenshots when writing the e-book. You can download and open these bonus files for Captivate versions 5, 6 and 7 to see exactly how the advanced actions and interactions I explain in the book are actually set up in a real project.
Why are some actions disabled or missing?
Novice Captivate authors often become alarmed when they open the drop-down list beside a given run-time event and find certain actions are disabled, as shown in the screenshot at right. There are actually good reasons for this behavior:
Missing Show / Hide
These actions will only be available if there are objects on the slide that could be shown or hidden, e.g. text captions, highlight boxes, etc. If there are no such objects, then Show/Hide actions are impossible and those actions will be disabled in the event’s action menu.
In the example screenshot at tright, the Apply Effect is disabled for the same reason. There’s no object on the slide to apply it to.
Missing Enable / Disable
These actions can only be applied to interactive objects such as click boxes, buttons, and text entry boxes. So these actions will therefore only be available if you have at least one interactive object present on the slide.
Missing Increment / Decrement
These actions only appear if there are user variables in the project that can be manipulated.
One little point here...even though Boolean variables can be set to 0 or 1 via advanced actions, system variables don’t appear in the list of variables you can select for manipulation via increment/decrement actions, so they don’t get taken into consideration here. (Most system variables are READ ONLY anyway.)
Solution: Supply the correct conditions for these actions to be enabled
All you have to do is add the appropriate objects to the slide that correspond to the types of actions required. In the case of increment and decrement actions, you need to have at least one or more custom user variables already set up in the project.
There is one type of action you will not find listed among the single actions and that is the Expression action. These are only ever available from within the Advanced Actions dialog that you use when creating or editing standard (as shown below) or conditional actions.
You may recall that the Increment and Decrement actions allow you to increase or decrease the values of numeric variables. Basically this amounts to just performing on-demand addition and subtraction. Expressions allow you to take this a couple of steps further to perform more complex math using multiplication and division, as well as addition and subtraction.
But it gets better... Not only can you specify a literal number as the amount to be used in the calculation, you can also opt to use the value of a variable. This means you can modify the value of one variable by adding, subtracting, multiplying or dividing with the value of another variable.
Now, stop and think about this concept for a moment. It may take a while before the possibilities of this hit home, but once you get your head around it, you'll find that Expressions open up lots of creative possibilities for your e-learning interactions.
Can you use Expressions to concatenate strings?
Strictly-speaking, Expressions are really only designed for doing math, but they can also be used (to a limited extent) for concatenating strings, as shown in the example below.
In the screenshot above you can see the ErrorMessages variable is being concatenated with another variable (Msg_Error_UserFirstName_IsNULL). Later condition blocks in this same conditional action can continue to concatenate extra messages to add to the information being displayed in the error.
However, as mentioned above, this kind of use is not what Expressions were really intended to do. Captivate badly needs some more actions that can be used for manipulating strings of text.