Skip to content

Understanding Adobe Captivate’s run-time events

In this article I explain Adobe Captivate’s concept of events and how they work in e-learning, as well as list all the events available to you as a developer when  working on a typical project file. Although you don’t need always need to use events in order to create, edit or display Captivate variables, you cannot use Captivate’s advanced actions without using events to ‘trigger’ or ‘execute’ them. So a good understanding of events is essential to mastering advanced actions.

In technical terms Captivate e-learning is known as being “event-driven”. This is just a fancy way of saying that what your learner sees on their screen at run-time is the result of some change that occurs within the e-learning application.

There are only really about a dozen different events to choose from. But as you read this chapter you may be surprised at how complex some event scenarios can become.  And deciding exactly which ones to use when designing your interactions can be something of an artform.  So let’s get started!


What is an ‘event’

Events are points at run-time of an e-learning module where something happens or changes. In the software programming world, events usually have names beginning with the word On.

For example, look at these events and their meanings:

  • OnClick – something got clicked;
  • OnMouseOver – the user placed their mouse cursor over something on screen;
  • OnMouseOut – the user moved their mouse cursor away from something on screen;
  • OnKeyEnter – the user hit a key on the keyboard.

In the software world events are used to call functions, i.e. do stuff. In Captivate, events are used to execute actions in your published content at run-time, i.e. do stuff.

Captivate’s run-time events have slightly different names to those shown above, but the same general concepts apply. They usually start with the word On (though there are some exceptions), and the name of the event gives you some idea about what happened or what changed to ‘register’ the event.

We’ll first consider events exposed by different types of slides and then look at events from objects present on the slides. Some Cp objects have no events, while others can have several.


Slide events

Master slides are the only Captivate slide type that doesn’t offer events to execute actions.

Normal slides

All normal slides have the following two events:

  • On Enter – This occurs when the slide enters the timeline at run-time.
  • On Exit – This event fires after the slide exits the timeline at run-time. It’s important to note this fact because it means any actions triggered happen on the next slide, not this one.

These events are clearly visible when you select a slide in the filmstrip and then look at the Properties tab > Action accordion. The drop down menus beside these events show the currently selected action each event will execute.

Why you should avoid using the On Exit event

You may have noted that the example above has no action set for the On Exit event of this slide. There’s actually good reason for this. The On Exit event is only fired after the slide reaches the very last frame on its timeline. This means any action assigned to the On Exit event would only be executed at the beginning of the next slide, not the slide you intended. Additionally, the final frame of a slide is often never reached because your user interacts with some object (e.g. button, playbar, or TOC item) that navigates them immediately to another slide in the project. This would mean the On Exit action would never get executed.

So, since you cannot always predict how users will navigate your course, it’s usually best not to use On Exit for anything critical. If you set the On Exit event to No Action, the slide will still progress to the next slide when it reaches the end of its timeline.

The most useful slide event of all is always going to be the On Enter event because it always gets fired for each slide, no matter how the slide was called.

Question slides

Question slides have the following events:

  • On Enter – As with normal slides, this event occurs when the question slide enters the timeline at run-time. Question slides don’t have an On Exit event. If you look on the question slide’s Properties tab > Action accordion, the On Exit event is disabled.
    This is because the On Success and On Last Attempt events actually replace the need for an On Exit event. The only way you’re supposed to end up leaving a question slide is after either succeeding or failing to answer it correctly.
  • On Success – This occurs when the question is correctly answered by the user.
  • On Last Attempt – This occurs when the user has answered the question incorrectly and has no more attempts available for use.

About the Multiple Choice quiz question Advanced Answer Option

While we’re discussing quiz question slides, it’s worth mentioning the Multiple Answer (radio button) quiz question type has a special trick up its sleeve that gives you yet another event you can use. It’s called the Advanced Answer Option and it allows you to execute an action based on the specific answer option a user selects from the radio button array in the quiz question.

This means you could choose to play a sound, show a different feedback text box, assign a value to a user variable, or execute any number of other actions based on which answer the user selects. What you do is entirely up to your imagination and creativity.

However, don’t get too excited about the Advanced Answer Option. It is only available with the Multiple Choice quiz question type and no other. You can of course fake a True/False quiz question by creating a Multi-choice question with only two answer options. But there is no way to use advanced answer options with Multi-answer (checkbox) quiz questions.

To get really creative with quiz questions, sometimes you just need to create them from scratch yourself.  But that’s a whole other topic…

The Quiz Result slide

Like question slides, the Quiz Result slide also has three events, but two of them are a little difficult to find because technically they are related to the quiz itself and would occur even if the Quiz Result slide were hidden or not present.

  • On Enter – This occurs when the Quiz Result slide enters the timeline at run-time. Like quiz slides, Quiz Result slides also have the On Exit event disabled.
  • If Passing Grade – This event occurs if the user successfully passes the quiz. It’s roughly equivalent to the On Success action of a quiz question.
  • If Failing Grade – This event occurs if the user fails the quiz and has no more attempts allowed. So it works in much the same way as the On Last Attempt event of a quiz question.

Like all of the previous slide types, the On Enter event action for a Quiz Result slide is configured from the Properties tab > Action accordion. But you won’t find anywhere on the Properties or Quiz Properties tabs to configure actions to be triggered by these other two events, If Passing Grade and If Failing Grade.

So where are they? Well it turns out you need to go to the Preferences > Quiz > Pass or Fail screen to find them.


However, there is something important you need to know about these two quiz events. They are only capable of triggering actions AFTER the quiz has been evaluated as passed or failed. That means these events only fire after you click the Continue button on the Quiz Results slide. Or, if the Quiz Results slide is hidden, they only fire after exiting the final quiz question slide in the quiz.

You should also be aware that setting Allow User Attempts to Infinite will effectively mean you can never fail this quiz because the term Infinite Attempts in Adobe Captivate actually means Infinite UNSUCCESSFUL Attempts.


Interactive object events

Now let’s look at the events you can use with screen objects, starting with interactive objects. In Captivate’s world an ‘interactive object’ is defined as any object that can evaluate to a Success or Failure condition. In Captivate you always know when you are dealing with an interactive object because you will see options on the Properties tab to enable or disable Success and Failure captions.

Listed below are the main types of interactive objects you will be using to execute advanced actions.

Buttons

Captivate offers four button types to choose from:

Text buttons – A simple button object with text label.
Transparent buttons – So named because you can set the value of Fill Alpha down as low as 0% to make them invisible (like click boxes).
Image buttons – These are actually composed of three images, one each for Up, Over, and Down states. The area occupied on screen by the button itself corresponds to its ‘hit area’. Captivate comes with about 30 image buttons you can choose from, but you can also create your own with any decent graphics editing software application.
Smart Shape buttons – When used as a button, a Smart Shape becomes a clickable interactive object with its own hit area. Smart Shape buttons have up, over and a down states. The down state (when the button is clicked) reduces the dimensions of the button by a few pixels but otherwise does not change its appearance. You can also add other custom Object States if necessary.

Click boxes

A click box is effectively an invisible ‘hit area’ that you can place over the top of other objects to make it appear as if those objects are clickable, when in reality the user is registering a mouse event via the click box instead.

Text-entry boxes (TEBs for short)

A TEB is essentially an input field that accepts numbers or text strings entered by the user, and then stores this data in an associated user variable. You need to turn on Validation in order to have the user input checked against one or more correct answers so as to register Success or Failure events.

TEBs are very versatile and useful interactive objects, but they also have a few extra wrinkles you need to be aware of.

Interactive widgets

These are small pieces of software written in JavaScript (if designed to be compatible with HTML5 output). Widgets extend the capabilities of Captivate beyond what it could do out of the box. But they are hard to pin down and describe because they may potentially be any kind of interaction the widget designer/developer can imagine and is clever enough to create. They are classed as interactive objects because they can also evaluate to either a Success or Failure condition and thereby trigger actions. However, exactly what constitutes success or failure is really up to the widget developer to decide.​

All interactive objects have at least two events that can be used to execute actions. These events are clearly shown if you select an interactive object and then go to the Properties tab > Action accordion. For example, the screenshot below shows the events available for a button.

On Success

This event occurs when the object evaluates to a success condition.

  • In the case of a button, click box or Smart Shape (used as a button), clicking within the object’s hit area is all that is required to register success.
  • For a TEB, if Validation is not turned on, success may simply mean the user has typed something into the field provided and clicked the Submit button or hit the ENTER key on their keyboard. However, if Validation is also turned on, then success means the user’s input was checked and evaluated to be a match to one of the pre-configured correct answers.
  • For an interactive widget, success is whatever the widget developer designed it to be. For example, if the widget is a drag and drop interaction, then success would be achieved by dropping objects on their correct targets. With widgets the possibilities are almost endless.

On Last Attempt

This event occurs when the object evaluates to a failure condition AND the user has no more attempts remaining. Take special note of the last part of that sentence about remaining attempts, because this is an area of confusion for many Captivate authors that I explain in this other article where I discuss what Unlimited Attempts really means. If the user still has any more attempts remaining, then as far as Captivate is concerned, they haven’t as yet failed the interaction, so no failure condition is registered, and that means there is no usable event.

Here are some examples of failure conditions for different types of objects if the user has flunked their last allowed attempt:

  • For buttons or click box objects, failure means you did not click within the object’s hit area.
  • For a text-entry box, failure means the number or text you typed into the field did not match any one of the specified correct answers.
  • For a drag and drop widget, failure means you did not drop objects onto their correct targets.

The On Focus Lost event

Text-entry boxes are something of a special case when it comes to interactive objects. Not only do they have the usual On Success and On Last Attempt events, they also offer one more called On Focus Lost. This event gets registered if the user has entered some text into the text entry field and then clicks somewhere outside the field, thereby shifting the focus elsewhere on the slide.

On Focus Lost can be a very useful event when capturing user input from a number of TEBs if you need to know exactly which field the user has just interacted with, or you want to trigger advanced actions to perform more complex validation of entered data.

Drag and drop events

Captivate 6.1 introduced a new feature called Drag and Drop Slides which caused a lot of excitement in the community.  One of the great things about Captivate’s new drag and drop capability is that it also gives you some more events to play with.

  • On Success – This event is registered when you drop all of the correct objects on their respective targets and the answer combination is submitted. You might have achieved this by clicking the Submit button provided, but you can also use the Auto Submit option as well.
  • On Last Attempt – As with all the other instances where we’ve seen On Last Attempt mentioned, this one is fired when your participant fails to achieve a success condition and they have no more attempts left. In drag and drop interactions, this means they haven’t correctly dropped all the right objects onto their correct targets.
  • Object  Actions – Another feature of Drag and Drop slides is that dropping a Drag Source object on a Drag Target object can also be used as an event to trigger an action.  The great thing about this feature is that each separate object dropped on the target can trigger an entirely different action.  This gives a lot of creative freedom to developers.

So that pretty much rounds up all of the events you can use when creating custom interactivity in Adobe Captivate.  Next comes the rather tricky question of how to decide when to use each one.


How to decide which objects and events to use in interactions

Now that you know about most of the available events, perhaps the big question in your mind is: “With a dozen or more to choose from, how will I know which event to use and when?”

Unfortunately this requires one of those maddening “it depends” answers. Which event you use in a given situation depends on two main factors:

  1. What specific results are trying to achieve with your interaction design?
  2. What kind of objects do you need to use to achieve that result? (This is because, as you saw above, different objects offer different run-time events.)

Event scenarios

Perhaps this whole event decision-making process is best explained by considering some examples of typical e-learning scenarios for which you need to create interactive solutions.

Let’s imagine you need to trigger an action when…

…the right thing gets clicked

This is easy enough to achieve using a click box, button, Smart Shape button or interactive widget. So, you can use the On Success event of those objects to execute a required action.

…the wrong thing gets clicked

You can use a button or click box set to only one allowed attempt, and use the On Last Attempt event. When the user clicks anywhere outside the hit area, they’ve immediately used up all allowed attempts and this will execute the action you specify.

But what if you need to allow multiple attempts on the correct area (perhaps because the user needs to click something repeatedly) but immediately detect any clicks outside this hit area? In that case you can set up a click box on a layer underneath the button and have the hit area of the click box cover the slide. The click box’s On Success event can then be used to trigger an action in response to this ‘failure’. (Since the correct button object is on a higher slide layer, if the user clicks the button, its hit area will register the hit instead of the click box underneath.)

See also my clarification here about what Captivate really means by the term ‘Infinite Attempts’.

…the participant enters a correct answer into a text field

Use a Text-entry Box object, turn on Validation and specify one or more correct answers. When the user clicks the TEB Submit button or hits ENTER on the keyboard, Captivate will evaluate the data found in the entry field to see if it matches any of the specified correct answers. If it does, then an On Success event is registered.

You can also use the Short Answer or Fill-in-the-blanks quiz question types to check user input for correct answers. However, there are some special wrinkles to be aware of with quiz questions.  (See the scenarios below about triggering actions when the participant answers a question correctly or fails to answer correctly.)

…the participant rolls their mouse cursor over an object

Captivate currently has no native object that can register a run-time event on mouseover which still enables publishing to HTML5.  (The Rollover Slidelet object is now being deprecated because it is only for SWF output.)

…the participant moves their mouse cursor away from an object

Captivate has no native object that is designed to register events on mouse out or rollout either.

…the participant drags an object somewhere

This one should be obvious. You need to use the On Success or On Last Attempt events of Captivate’s native drag and drop functionality.  Alternatively, use the Object Actions triggered when a drag object is dropped on a specific target.

…as soon as a slide is played

In this scenario your best option is to use the On Enter slide event. The On Exit event of the previous slide is not a good choice in this situation because it only gets fired when the final frame of the slide is reached. That event may not fire in some cases, for example, if the user clicks something that jumps them to a different slide. Therefore, using the On Enter event of the slide where you want something to happen is a better choice because it will always occur no matter how the slide was reached.

I use lots of On Slide Enter events in my projects for setting up slides that need to respond to actions the user may have taken elsewhere in the course. For example, you can use Object States in Captivate to set up a main menu slide with objects that change state to indicate which parts of the e-learning module the learner has not attempted as yet, which parts have been attempted but not completed, and which parts have been successfully completed. It also shows how to use the On Enter slide event in another example that replicates a dynamic drop-down menu in a software simulation.

…as soon as a slide is completed

This one is more difficult than it appears. It is certainly one situation where you could consider using the slide’s On Exit event. However, in order to be certain the slide is played all the way to the end and the event is fired, you would need to disable any other means of navigation away from the slide. That could require disabling the playbar and TOC (if your project has them).

Another way to achieve this goal could be to deliberately provide an interactive object that the user must click to progress further. But again, in order to be certain that the event is fired when the slide is completed you need to have the clickable object only appear after the user has viewed all content and also make it impossible for the learner to navigate away from the slide by any other means.

Sadly, there is currently no On Focus Lost event for slides like the one available for TEBs. In view of the difficulties attached to reliably ensuring a slide is completely viewed, I tend to avoid building interactions that require this.

…the participant answers a quiz question slide correctly

Use the On Success event of the quiz question. However, this may not work exactly the way you expect it to. You need to be aware of a couple of subtleties that apply to quiz questions:

  • If you have feedback captions turned on for the quiz slide, then the On Success event only fires AFTER you dismiss the feedback caption by clicking again somewhere on the slide.
  • If you have feedback captions turned off, then the On Success event fires as soon as you select a correct answer and click the Submit button.

…the participant fails to answer a question slide correctly

Use the On Last Attempt event of the quiz question. As with the previous example above about correct answers in quiz questions, there are some subtleties to be aware of here:

  • Firstly, if you have allowed infinite attempts on the quiz question, then the On Last Attempt event will never fire, because as far as Captivate is concerned the user can never fail this question. (See my clarification of the meaning of the term ‘Infinite Attempts’.)
  • Secondly, if you have allowed a specific multiple number attempts on the quiz question (e.g. 2, 3, 4, etc), then the On Last Attempt will only fire when the user has failed to select a correct answer and there are no more attempts allowed.
  • Lastly, the On Last Attempt event will only fire AFTER you dismiss any feedback captions present on the slide. If there are no feedback captions to dismiss, and all other check-points mentioned above have been passed, then the On Last Attempt event will fire. So as you can see, using the On Last Attempt event in Captivate is not quite the same as saying you want something to happen when the learner gets the question wrong.

…the participant passes the quiz

Use the On Success event of the quiz. This event is closely related to the Quiz Results slide. But as we found with quiz question slide events, there are also some complexities here as well. Pay close attention to the following explanation:

  • If the Quiz Results slide is hidden, then the On Success event of the quiz fires when the participant has achieved a passing score and passes beyond the final quiz slide.
  • If the Quiz Results slide is showing (i.e. not hidden), then the quiz On Success event fires when the participant has achieved a passing score and clicks the Continue button on the Quiz Results slide and allows it to play all the way to the end. Please note the final part of that last sentence. It seems that the On Success event for a quiz is only registered on the last frame of the Quiz Results slide. If your user gets to the Quiz Results slide and then uses the TOC, playbar, or Smart Shape button to jump to slides beyond the Quiz Results slide, then the On Success event does not get fired and no event attached to it will be executed.

…the participant fails the quiz

And this one means you’ll be using (you guessed it) the On Last Attempt event of the quiz. The number of allowed attempts on the quiz is set in Preferences > Quiz > Pass or Fail > If Failing Grade. The normal default is one attempt, but you can set any number here all the way up to Infinite Attempts. However, just as we found to be the case with interactive objects, if you set attempts to Infinite, then the On Last Attempt event will never fire.

What if you need to trigger multiple actions from a single event?

In some cases you need to do a combination of several things as a result of a single event. This is where the full power of advanced actions really becomes evident. But you need to walk before you can run.

For now, just focus on getting your head around the concept that every action must be executed by some kind of run-time event. In other articles on this site we’ll be discussing how to use Standard Actions and Conditional Actions to execute multiple events.


Where to next?

Congratulations on getting to this point in this rather long and complex topic.  But run-time events on their own will never do anything in a Captivate e-learning module.  They’re just the ‘triggers‘ that execute Advanced Actions.  So now that you know how events work, your next task should be to learn all about the different types of actions you can use:

  • Single actions
  • Standard actions
  • Conditional actions
  • Shared actions