Play/Pause Button extended (Classic Captivate)

Intro

This blog post is due to a forum question. For a custom Play/Pause button the developer tried the workflow from this post. However there was a second request: the learner was expected to click an interactive object to proceed to the next slide. The original conditional action for the Play/Pause button results in a conflict: if the learner clicks that button multiple times, the Play action can override the pausing point of the interactive object meant to pause the slide indefinitely until the learner clicks it to proceed to the next slide. If you want to learn more details, please check out this thread.

My promise: a workflow, taking into account that it should be possible to use it on multiple slides. You can test it out in the Example project. Maybe some of you could be in the same situation, hence this blog post. It is based on deep understanding of Captivate's Timeline, micro-navigation, power of shared actions and objects timed for the rest of the project. 

If you are wondering: this workflow is impossible in the new version 12 for multiple reasons.

Example project

Please test this project, either by watching it using this link for a scalable version, or the static resolution version embedded below. After the introductury slides you'll find two slides with the Play/Pause button. Test them by clicking that button multiple times and watch what happens when you reach the end of the slide: the button will change its state but the play head will remain paused until you click the

 Next button.   I used some design elements/slides from the non-

responsive Quick Start Project 'League'.


Background

The basic conditional action for the custom Play/Pause button, which is timed for the rest of the project to start with is:

I used the simple commands Pause and Continue, which have exactly the same result as assigning values to cpCmndPause/cpCmndResume. Toggling those variables alhough they are Booleans, is not possible (sorry). I preferred the 'Go to Next State' for the PlayPause button. This is the object state panel of the button, this command is toggling between the two states.

Due to the timing of the button for the rest of the project, it has always the same ID and the advanced conditional action has nothing which changes when being on another slide. Problem is that when the button is clicked to the Play state on the pausing point of the Next button, the Continue command will override the pausing by this button. To solve this we need to know 'where' that pausing point is, and add a new decision to the conditional action, where Pause occurs in that situation even when the learner clicks to play again.

If you have an instance of the Next button on each slide, to time it near the end of the slide, its pausing point will be at a different frame on each slide. In the example project, to simplify, I timed the Next button for the rest of the project and took out its Pausing behavior. But I added a click box on each slide, pausing at the end of the slide. The click box is invisible (no feedback messages) to the learner. 

I need to define on which frame the slide has to pause indefinitely. In order to keep the Play/Pause button action independently from that frame, I have to store it in a user variable. The value of that user variable will be defined using the On Enter slide event. 

Step-by-step workflow

Variables

System variables

The used system variables are:

  • cpCmndPause: has value 1 when slide is paused, value 0 when it is not paused.
  • cpInfoCurrentFrame: frame number of the present frame, index starts with 0; frame number is over the project not the slide.
  • cpInfoFPS: number of frames per second; default value is 30 but can be changed.

User variables

Two user variables will be used but since they both appear in a Shared action, they'll be defined when you send this shared action to a new project:

  • v_start: will store the frame number of the first frame of the slide
  • v_end: will store the frame number of the frame where you want to pause indefinitely; it will be near the end of the slide, but it doesn't need to be the last frame.

Events and actions

You'll see an overview of the actions on the two slides where the Play/Pause button is important in the Advanced Interaction panel::

PlayPauseAct (advanced action)

This action is triggered by the Success event of the Play/Pause button:
The second decision is simple: The play head will always be paused when the frame number is higher than the on in v_end. Due to the sequence of the decisions, the state change for the button will occur, but Continue will be overridden if the second condition is fulfilled.

EnterAct (shared action)

This Shared action is triggered by the On Enter event of each slide, has 3 parameters:
The first parameter is the one who will be different on each slide. In the screenshot it is set at 18 seconds. It means that once the playhead reaches the frame at 18 seconds it will be paused by the second decision in the PlayPauseAct. Since frame numbers are on project level, the first frame of the slide is used as reference. The Expression commands are needed to perform some math operation to calculate the exact frame number. This literal depends on the Timeline. Have a look at the Timeline of slide 4
For this slide the first parameter was set at 45 seconds:
For slide 5 this was the Timeline:
In this case the first parameter was set at 9 seconds.

On the last slide (6) I used the On Enter event to hide the Play/Pause and the Next button since they were no longer needed.