Menu slide: forced view and different audio on revisit

Intro

Another post meant as answer to a more complicated question in the Adobe forums. You can find the (long) thread under this link. Title 'Play different audio on slide revisit' is not covering the final required situations. I will explain the end situation in short terms.

  • Project has a menu slide with 4 buttons. Each of the buttons jumps to a chapter of the course. There is narration on this slide, which needs CC and that means it has to be slide audio. That slide has staggered items synchronizing with the narration, and also several  effects applied to objects. The learner can click each button multiple times. Buttons are all active.
  • At the end of each chapter the learner returns to the menu slide. On return the playhead should skip immediately towards the end of the slide, when all the objects are in place and narration has finished. Except...
  • When the four buttons have been clicked at least once another audio clip needs to be played. That clip doesn't need CC.

The solution is less easy than I thought, hence this blog post. 

Example project

I created a barebone project for testing, using some slides from the Quick Start Project Safety. Have a look, to understand better what I explained about the request.



The course has 7 slides:

  • Slide 1: Title (poster image is based on this first slide)
  • Slide 2 = menu slide
  • Slides 3-6: one slide for each chapter
  • Slide 7: End slide

Analysis

The menu slide should appear in 3 possible states:

  1. First visit: default state, play head will start from the first frame and pause at the pausing point, narration (slide audio) and effects will be visible.
  2. Later visits, when not all buttons have been clicked at least once: audio shouldn't play and no need to wait for the staggered objects and their effects. The easiest way to realize both is using the shared action explained in this blog post:
    Force first view and/or play audio only on first visit
  3. Visit when all buttons have been clicked at least once: situation like in 2 BUT another audio clip needs to play. At the end of that clip something needs to happen. I choose to jump to the end slide, but this can be replaced easily by another command.

Have a look at the Timeline of the menu slide in the Example project:

You see the staggered objects including an entrance effect. Those are the white numbered shape buttons. The meaning of the top most button (SB_Done) will be explained below but you see that it has audio attached (object audio).

Step-by-step workflow

Variables

Create the user variables shown in this screenshot. The tracking variables (one per chapter) v_1 - v_4 are Booleans, default value =0. The variable v_skip will be populated with the duration of the narration audio clip in seconds. The variable v_audio gets the duration of the final audio clip. As indicated in its description v_buttons is meant for the sum of the tracking variables, which will be calculated whenever the menu slide is revisited.

Button SB_Done

Since it proved to be impossible to use Play Audio for the final audio clip in the project, I opted to use Object Audio. That type of audio plays when the object appears, or is made visible.  The shape button which I use is invisible because both Opacity (fill) and Stroke are set to 0. The eye button in its Properties is marked 'Invisible in Output'. The audio clip is added in the Options tab. The action nor the attempts matter, since the Jump to the last slide will not be done by clicking this invisible button. Have a look at the Style and Options tab in these screenshots:

ReturnAct (shared action)

This action is triggered by the success event of the Return buttons at the end of each chapter, it is pretty simple to understand from the Preview screenshot:

EnterAct (advanced action)

This action is triggered by the On Enter event of the menu slide, takes care of the three possible situations (see Analysis above). Both conditional decisions are mutually exclusive because they are based on the value of the sum variable v_Buttons.

I could have used JS to calculate the value of v_buttons to avoid the sequence of the 3 Expression commands.

If you want to reuse this action for other projects, I would recommend to convert it in a shared action. Be careful with the two literals (duration of both audio clips). They can be tricky, and it may be better to replace them by variables getting their value in the Variables dialog box.

Overview: Advanced Interaction

This screenshot shows all events and actions in the example project.