Intro
Yesterday I posted this example project with the promise to explain the used workflow in a blog post:
Play/Pause (Timeline use case) – eLearning (adobe.com)
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.