Audio Objects: Control them!

Intro

Last year I published Playtime with Audio ... where I introduced the term 'Audio objects'. This is audio attached to an object that is invisible to the user, has no other functionality than offering the possibility to control the audio by hiding or showing the 'invisible' object using (advanced) actions. Since that blog post I got several questions about controlling the audio objects. In the example you will view here, I focus on audio objects for question slides. And some other tweaking occurred as well, that I will perhaps explain in a later post. Here we go

Example

View this movie and watch/listen carefully. You'll see two question slides, both Multiple Choice Questions. The first, with radio buttons, has only one correct answer and I used the Advanced Answer options to give feedback and to branch to more information about the answers. The second question has multiple correct answers, so Advanced Answer options are not possible there. Both question slides have an audio object (same for both to keep filesize restricted), that will play only on first visit of the slide. From the first question slide you will be navigated to another slide and then returned to the second question slide. The second question slide has the same audio object, but when submitting an answer, you'll get audio feedback and the audio on entering is stopped even if it is not yet finished playing.

Audio Object

For the invisible object to which the audio is attached I will mostly use a Highlight box with a dedicated style 'AudioObject', that I cloned from the original Highlight style. Because I created that style before opening any project, it is available in all my projects. When planning to use a lot of audio objects I will even set it as the default Highlight style. Why do I choose for Highlight box? First of all, because it has a style, which is not the case for any drawing object (which otherwise would be my choice). Secondly to make it invisible just set the Alpha for the Fill to 0 and the Stroke Width to 0 as well. 

Work flows to control Audio Objects

Play only first time

On entering the question slides, I trigger a conditional advanced action EnterOne/EnterTwo that uses a created user variable, one for each question slide: v_one, v_two.
This variable will be incremented and then checked. The first time the user enters the slide, it will be 1 and the audio object will play because it is set to visible. All subsequent entries will result in a value greater than 1 and the conditional action will hide the audio object, which means that it will not play. Here is the description of the conditional action:
  • First decision Increment is a mimicked standard action to increment the user variable. Here is a screenshot from EnterOne.

     
  • Second decision CheckEntry checks if the value of v_one (v_two for the second question slide) is greater than 1; if that is the case, the audio object AuEnter1 is hidden and Continue is added to avoid blocking the playhead, if not only Continue is needed in the Else portion. Screenshot from EnterOne:


The action EnterTwo is similar to EnterOne, you only have to switch the variable from v_one to v_two and the audio object from AuEnter1 to AuEnter2 (because I labeled those objects that way).

The advantage of having all actions executed on entering this question slide is that it doesn't matter from where the user is navigated to this slide. In this use case it is important, because the first question slide can navigate to five possible slides. If you added the condition to an interactive object on those slide, you'd need to have 5 different actions, and another one for the Retake/Review navigation from the score slide.

Stop audio when other audio starts

If you listened carefully to the movie and quickly entered an answer on the second question slide (about eLearning Suite), you will have noticed that the audio object that was played on entering the slide (if first time) is cut to be able to listen to the feedback audio. This is bit more complicated, because I had to tweak the functionalities of the question slide. This was my work flow:
  1. Kept only the Incomplete Text Caption, but delete the Correct and Incorrect Text Captions
  2. Unchecked the Back button but allowed Backward Movement in the Quiz Preferences (see later)
  3. Created two Text Captions: TCWrong and TCCorrect that have audio attached to them but are set to Invisible (uncheck Visibility in Properties panel)
  4. Created a Success2 and Failure3 advanced action to be triggered on Success or on Failure (allowed only one attempt on Question level)
Here is a screenshot of the Properties panel of that Question slide:

Success2/Failure2 are similar standard Advanced actions that do hide the audio object AuEnter2 (playing first time when entering slide), show the appropriate Text Caption and the inevitable Continue statements.

Be careful: the playhead on this question slide will stop at the pausing point of the question slide. In this screenshot of the Timeline this is at 1.5 seconds. In order to 'hear' the audio attached to the Captions TCCorrect/TCWrong you have to move the start of their timeline close to that pausing point. I do not pause the slide, the playhead once released by the Submit button will get on and on reaching the end of the slide continue to the next slide (Score). So I had to extend the duration of the Caption timelines to be as long as the longest audioclip attached to them. 

Other tweaks

As told in the Intro, I will not explain the other tweaks that I have mostly treated in other blog posts like Question Question Slides. Here is a short list:
  • Changed the Skip button to Next, and dragged it under the Clear button
  • Extended the Quiz scope to be able to navigate to the explanation slides (that are before the question & score slide) by adding a scored object (Next button) on first Intro slide (not to include in Quiz total)
  • Because Retake/Review will navigate to the Intro slide, I created a EnterIntro conditional advanced action (similar to the other Enter actions) that navigates immediately to the first Question slide if the user visits this Intro slide not for the first time
  • The Next buttons on the slide do not always navigate to the real next slide, but are used for branching when necessary.
  • To explain difference between Click box and Button I used 3 slides, and the possibility to show the Timeline for more than one slide
If you have more questions about those tweaks, or suspect that my list is not complete, please feel free to post a comment.


13 responses
Hi lieve, I tried your first example above of having a audio play one time only on a question slide. It worked just as you outlined. I'll have a look at the section on "Other tweaks" tomorrow. thanks again. keep up the great work. Cheers, Ben.
Thanks, Ben, so glad you found my blog now.
Oh Lieve, I forgot to mention that the link to the Question Question Slides tutorial above still points your old posterous.com site. Ben.
Thanks, Ben, I updated the link.
Hi Lieve, I'm like to have a slide with an audio play only one time on my intro slide. I've been trying to adapt your idea of having an audio file only play once, from this article (Audio Objects: Control them!). But it isn't on a question slide but I'd can't get the slide to pause and not continue. The Advanced conditional action you outlined in that article works well here but I can't get the slide to pause when the audio finishes. I've tried changing the EnterOne action in the CheckEntery condition to: If v_one is greater than 1 hide AuEnter1 instead of (continue) I tried: Jump to introduction (effectively jumping to the same slide) The result is that is doesn't stay on this Intro slide but goes to the next slide! Do you know any straight forward way to do this? Cheers, Ben.
Hi Lieve, I've come up with a simple workaround. I duplicated my introduction slide keeping all the assets, make its timeline less than a second and then pause the Action On Enter. So it does what I needed it to do. The audio on the Intro slide plays only once and then on this identical slide it pauses. Cheers, Ben.
I only just got on the Captivate bus, with version 8. But, unless I've missed the trick, CP8 won't let you set stroke width to a value less than one or opacity to a value less than 10%. You can still check the box that specifies the object is invisible, but in that case the attached audio is NOT played. I'm at a loss trying to figure out how to play sounds at arbitrary times without objects becoming visible. Help? Thanks muchly!
You can change stroke width to 0: either double-click in the text field and type in 0, or use the down arrow key to decrease the width. You can also use the scroll wheel of the mouse instead of the arrow key. Same work flow for Opacity. UI change is supposed to be easier for newbies, but I certainly do not agree with that viewpoint. This means that it is still possible to make the object invisible to the user. An object with visibility unchecked in the Properties panel (it is the eye icon, because newbies seem to be supposed illiterate :)) doesn't exist in the file, attached audio to it will not play.
I have Closed Captioned slides that I would like to not play the second time the learner accesses the slide. How do I make this happen?
Closed Captioning only works for slide audio. This blog post was not about slide audio but about audio objects.
@MarloweSkinner - did you ever figure out how to do the run once for audio and closed captions with a slide audio?
2 visitors upvoted this post.