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
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.
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:
- Kept only the Incomplete Text Caption, but delete the Correct and Incorrect Text Captions
- Unchecked the Back button but allowed Backward Movement in the Quiz Preferences (see later)
- Created two Text Captions: TCWrong and TCCorrect that have audio attached to them but are set to Invisible (uncheck Visibility in Properties panel)
- 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.
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.