Quiz Tweak 3: Play Audio/Object Audio
In this post which is about handling other audio clips than slide audio (treated in the previous article), you learn how to prevent user to submit an answer before listening to the audio, and how to prevent to have two audio clips playing at the same time.
In a first Tweak post I explained how to replace text feedback messages by images. Both types of messages can have audio attached to it, it will be Object audio. In the second tweak post I explained how you can cope with Slide audio: learner has to listen to it before the Submit button appears, to enter an answer. Slide audio is necessary when you want to use the Closed Captioning feature of Captivate. In this second part you’ll get some ideas about tweaking situations with Object Audio and Play Audio Command.
Alternative for Slide audio
This alternative means that you don’t need Closed Captioning, or at least that you don’t want to use the CC feature of creating it.
If you replace Slide Audio by the Play Audio Command triggered by the On Enter event of the quiz slide, you do not need to extend the duration of the quiz slide to the length of the audio clip as is the case with slide audio. As with slide audio, the default pausing point of the quiz slide will not affect the audio which will continue to play. If the user answers quickly, and proceeds to the next slide, the audio will stop automatically.
- If you want the learner to listen to the full audio before seeing the Submit button, you can use a similar approach as with Slide audio:For non-responsive projects and responsive project with Breakpoints: make the original Submit button invisible (will remain active) and create a dummy shape looking like that button. Create a shared action to be triggered On Enter, but which will now include the Play Audio command at the beginning. That audio clip will also be a third parameter as you can see:
- Having an Alpha effect to hide the Submit button for a certain time (only workflow functional for Fluid Boxes project) will not be possible if the slide duration is not extended (which was the advantage of Play Audio). It can be used if you increase the duration of the slide, and move the pausing point.
Skip/Switch audio during Review
If you allow review after passing the quiz or failing on the last quiz attempt, you certainly don’t want to hear the same slide audio during review on question slides. You may want to exclude audio or replace it by another audio clip. When using Slide audio, you can only use an approach similar to the workflow with micro-navigation, explained in this post
That workflow allows only skipping the audio during Review. Instead of the tracking variable you can use in this case the system variable cpInReviewMode which is a Boolean, has the value 1 when in Review mode.
It is much easier when you are using Play Audio. Use the shared action shown before as template for a conditional action, which you can convert again to a new shared conditional action. Have a look at this screenshot, same parameters are needed as for the standard action without check for Review mode:
If you want to switch to an other audio clip during Review, you’ll have to add a Play Audio command in the ELSE part of this action, which will add one more parameter (second audio clip) to the shared action.
Before the command ‘Play Audio’ was added to Captivate, the alternative was the use of what I labeled an ‘audio object’. It is audio attached to an invisible object, mostly I used a highlight box with a style where everything was set to 0. It is described in an old blog post.
The idea is that when you show the audio object it will start playing, when you hide it stops playing. You can use this also as an alternative for slide audio, since audio will not be stopped by the pausing point neither. I wanted to mention this special type of object audio which can be used almost exactly the same way as Play Audio command, for both forcing to listen to the audio as for skip/switch audio during Review. However there is one big difference: it is never possible to have two audio clips playing at the same time when using Play Audio to start them. Starting a second clip when the first one has not finished playing, will stop the first clip automatically. The command ‘Stop Triggered Audio’ is like built in the command ‘Play Audio’. That is not the case with Audio objects: if you have two or more of those objects visible on the same moment, they will all play.
Multiple clips playing same time
Typical situation: you have audio started with the quiz slide in whatever way (slide audio, Play Audio of audio object), and you have attached audio to the feedback messages. If one of the messages appears before the main audio has finished, you’ll get a nice audio cacophony. For this situation the solution has already been given: force the user to listen to the main audio before he will be able to submit an answer with one of the previously described workflows.
Contrary to what some users believe it is not possible to stop audio when the user clicks the Submit button, first step in the Submit Process. The actions (Success/Last Attempt) from the Quizzing Properties are only triggered on the second step. It is possible to skip the first step, but that is the topic of a next Tweak Quiz post: tweak the Submit Process.
Next blog post will be about tweaking the Submit process: how to replace the second step by the appearance of a Continue button (similar to what you have in VR projects), nd about skipping the first step of the Submit process.