Combining Slide Audio and 'Play Audio'

Intro

This short blog post is meant to answer another question on the Adobe forums. It is at the end of this thread:

https://community.adobe.com/t5/captivate-discussions/pausing-slide-audio/td-p/12312792

This was the goal:

  1. Slide has narration as slide audio
  2. There are multiple shapes used as buttons, which should trigger an audio clip using 'Play Audio' command; those shapes have no pausing point.
  3. When a shape button is clicked the audio clip should play, but the slide audio should pause, and resume after the audio clip ends.
  4. There is at least one more interactive object pausing the slide towards the end. Idea is that the learner can still listen to the audio clips after the slide audio has finished.

This learner tried to solve this with simple actions, using the feature 'Pause slide audio when clicked'. It cannot be solved that way however.

Example project

Watch this short project created to double-check my proposed workflow with a shared action for the shape buttons. After the Title slide you'll see a slide with a Next button to pause the slide, and a shared action triggered by each of the shape buttons. A copy of the Timeline panel can be found on the third slide. I used some slides from the Aspire Quick Start Project.

You can open a rescalable version using this link or watch the embedded version below:



Setup

You could see the slide audio (narration) in the Timeline panel. The audio clips for the shape buttons were imported to the Project library, and their exact duration was checked, because it will be needed in the shared action. Have a look at the shared action with its two parameters (name audio clip and duration clip):

It has two parameters:

The command Pause in the action will pause the slide audio automatically, contrary to a pausing point of an interactive object. You don't have to change any setting in the shape button Properties. The Continue command which will be done at the end of the audio clip will take care of resuming the slide audio.

Do not bother about having two clips playing at the same time. If the learner clicks another shape button before the first audio clip ends, that first clip is stopped automatically. No need to add a command like 'Stop triggered audio' which is only needed when you want to stop a playing clip without playing a new at the same time.

The user is concerned that applying the shared action will take more time than the approach he tried out with simple actions. However, since you don't have to change settings in the shape button Properties panel, the shared action approach needs even less clicks. Check it out. There is no danger of choking Captivate which could happen if you use duplicate advanced actions since you are using instances of one shared action (ecologically).

Problem

The previous solution works fine until the learner has reached the pausing point of the Next button. At that moment, the Continue command in the shared action will override the pausing and the playhead will continue until it reaches the end of the slide and moves to the next slide. It is necessary to cope with that different situation. The Delay command nor the Continue command take into account possible pausing points. 

There are two different situations, each needing a different workflow:

  • Learner clicks a shape button before the narration has ended. In that case the slide audio needs to be paused, and to resume after the end of the triggered audio clip.
  • Learner clicks a shape button after the narration has ended. You need to maintain the pause which occurs at the pausing point of the Next button.

This screenshot shows the Timeline panel, illustrating the two situations. Situation 1 in red, situation 2 in blue.

This needs apparently a conditional action for the shape buttons. You have to figure out which situation is valid. For that reason you need to know when the narration has ended. It is easy to see its duration in the timeline, in this case it was 28secs. To calculate the frame number at the end of the frame I used micro-navigation. If you are new to this type of navigation, please have a look at this blog post:

Intro to Micro-navigation

Solution

Variables

You need two user variables:

  • v_start: will store the frame number of the first frame of the slide with the narration and shape buttons
  • v_stop: will store the frame number at the end of the narration

Contrary to the timeline panel where seconds restart on each slide, the frame numbering continues throughout the project.

Shared Actions

EnterSlideAct

This shared action will be triggered with the Slide Enter event, and is meant to calculate the value of v_stop. Have a look:

The first frame number of the slide is stored in v_start. The duration of the narration is converted to frames, by multiplying with the system variable cpInfoFPS. The only parameter is that duration.

PlayAudio_Act

The former standard action has been transformed to a conditional action:

Same parameters as before. The condition checks if the learner clicked the shape button before or after the end of the narration. Only when the narration hadn't been finished it will need to resume. That has been done with the Delay command and Continue. That is not necessary after reaching the end of the narration, because the pausing point of the Next button needs to be kept pausing, and the narration doesn't need to resume.

This shared action is needed for each of the interactive objects used to play an audio clip.  In the project I used shape buttons. They are visible in the timeline screenshot as SB_Topic1…. SB_Topic4.

By using shared actions instead of duplicate advanced actions, you avoid choking the project if you need lot of those actions which was the case for the user asking the question. Moreover multiple instances of the same shared action also will result in a smaller file size. Of course they are also very easy to transfer to future projects. You can learn more about using shared actions in these videos:

Use Shared Actions: Lesson 1 (crash course)

(re)Use Shared Actions: Lesson 2 (crash course)