The below instructions will show you how to:
1. Allow the user to toggle the audio on and off by clicking on the object
2. When the user clicks the object the audio will play from the beginning.
Thus, the first time the user clicks the audio will play, when the user clicks a second time, the audio will stop, when the user clicks again, the audio will start replaying from the beginning.
First, record or import the audio into your library and name the audio in the library so that it is easy to identify. To rename your audio in the library, simply double click on it in the library and type in a fitting name.
1. Insert the object onto the slide that you want the audio to be connected. Do NOT attach audio to the object. Audio > Import > Slide
Or import into your library and drag onto the slide
Or import into your library and drag onto the slide
2. Create a User Variable such as A_AudioPlayPause
a. Project/Variables
b. Create New
c. Type in A_AudioPlayPause
a. Under the objects Properties > Action, click on the drop down to select: Execute the Advanced Actions
c. In Action Type, click on the drop down and select Conditional actions
e. In the IF statement
i. Double click the first column select variable, select your variable A_AudioPlayPause
ii. Click the drop down in next column to right and select Literal, then type in the number 0 (zero)
f. In the Actions statement
i. Double click in first column and select Assign
ii. Click the drop down in the column to the right select Variable and select your variable A_AudioPlayPause
iii. Double click in the column to the right, select Literal and type in the number 1
iv. Click Enter on your keyboard
v. In the next row down, double click and select: Play Audio
g. In the Else Statement
i. Click on Else to bring the Else box up
ii. Double click in the first column and select Assign
iii. Click the dropdown in the column to the right and select the Variable, then select your variable - A_AudioPlayPause
iv. Click the dropdown in the column to the right and select Literal then type in the number 0 (zero)
v. Click Enter on your keyboard
vi. Double click in the row below and select: Stop Triggered Audio
4. Attached the Advanced Action (AA) to the object: With object selected under Properties/Action/Script click on drop down to select your Advanced Action
I am so happy to have found you!
ReplyDeleteThis works fine for some things but I'm trying to make it play the audio as normal when the slide loads, pause the audio when the button is clicked, then RESUME the audio when clicked a second time. I'm a novice with advanced actions so any help would greatly appreciated.
Using Captivate CS6!
Hi Frederick, yes, you should be able to do what you are asking. You want the audio to play when the user enters the slide and then turn off when the button is clicked and then play again again from where the audio left off. You can email me directly at anitahorsley@gmail.com and I can try to help you out.
Deletei want it too, plase sent me at rezianislami@gmail.com
DeleteHi Anita Horsley, I too need to start the audio when the slide loads, have the user pause it and then start it again and thus resume with the learning module. Are you still available for some assistance?
DeleteHi Anita Horsley, I too need to start the audio when the slide loads, have the user pause it and then start it again and thus resume with the learning module. Are you still available for some assistance?
DeleteThis is great. The situation I have is a slide with several click box interactions that play audio when clicked. However, if a user clicks another interaction before the first one stops playing, both audio tracks play simultaneously. I'd like to set audio to pause when any other interaction is clicked. Is that possible?
ReplyDeleteHi Angela, yes, you can do that. The trick is that when you record the audio or import the audio onto the object it will give you a popup that asks: "Do you want to extend the display time to ___ seconds to match the new audio" You must click NO here. If you click NO, then the audio will stop when the user clicks another object. Hope that helps. Anita. Also check out my handouts on the the most current Advanced Action blog page, I have other tutorials about audio in there, there are 3, PDF's. 1 and 2 have audio tutorials that you can download for free. http://captivatecrazy.com
DeleteThank you! Unfortunately my work laptop is blocking the downloads, but I'll definitely check them out when I get home today.
DeleteIn the meantime, one last question. I was able to import the audio to the object and choose No on extending the display time. However, I'm finding that the audio stops playing on its own when the object reaches the end of its display time. It also seems to be overriding my Next button and advancing the slide automatically. Thanks for any feedback. I'm very new to Captivate and don't have any resources in my workplace to help me.
Hi Angela,
DeleteHumm, that shouldn't be happening. Have you tried extending your timeline? Also, have you tried clearing your Cache lately? Go to Edit/Preferences and Clear Cache.
It shouldn't be overriding the Next button, do you have a pause on your next button?
Hi the same thing is happening to me. After my audio plays, it overrides my next button, which is set to pause after 3 seconds, and advances to the next slide. I have cleared my cache and extending my timeline only prolongs the slide until its end and then it advances to the next slide by itself. What can I do to prevent this? If there is a way, I can upload my file for someone to look at, but can't seem to crack this case.
Delete@Sarah, I somehow missed your post from Jan. I'm very sorry. Did you ever get your audio issue worked out?
DeleteAnita, thank you so much for sharing your knowledge like this! I have a screen set up similar to this with advanced actions to start and stop audio for different links/buttons on the screen. Unfortunately, no matter what link/button I press during Preview, the same audio file plays. Whichever audio file I played first will play for every link/button I click on even though I have different audio files selected for each link/button. Have you run into this before and do you know how to fix it? Again, thanks so much!
ReplyDeleteHi Mitzi, that is very strange. Have you tried clearing your Cache lately. Before opening your project, Go to Edit/Preferences or for MAC Adobe Captivate/Preferences Under the General Settings, there is a clear cache button.
DeleteThanks for your quick reply, Anita! I tried clearing the cache again and I'm still getting the same problem. Do you have anymore ideas for this problem? Thanks!
DeleteHi Mitzi,
ReplyDeleteFunny, I just re-read my own blog post and I had forgotten that number #1 states: Insert the object onto the slide that you want the audio to be connected. Do NOT attach audio to the object. (1). I forgot!!! Thus, if you want to do this particular advanced action, you can only attach the audio to the slide and can not attach this to multiple objects.
If you want to attached audio to multiple objects. You need to attach the audio to a text box, name the text box and make it invisible (select No, when the popup asks if you want to extend the time). You can then make a standard advanced action to Show the text box when the user clicks the button. The problem with this approach is that if the user clicks off before the end of the audio and then clicks back on, it does not start from the beginning. It continues where it left of, which is okay except when it gets to the end of the audio and if the user clicks again, it doesn't start over. If you want more information it maybe better if you email me at: anitahorsley@gmail.com
thanks very much for your time.
ReplyDeleteZoe
You're welcome Zoe. Glad you enjoy the blog!
DeleteHello Anita, I am having an issue with advanced actions in a training with Demo. I have a pop-up box that works as a CC script for my learners. I have a button to close and open the pop-up. I set one button to hide the box and the other to show the box. The show advanced action works fine, the hide advanced action pauses the slide. I have no idea how to make this stop. The slide transitions into a demo at the end so I am not sure if this is what is causing the issue.
ReplyDeleteI tried the same hide/show advanced action on another slide with no demo and it worked perfectly. Can you help me with this?
Hello, TTurner, do you have a pause on the button? You can email me at anitahorsley@gmail.com and I can see what I can do.
DeleteThis works, however when you exit the course, and re-enter, because its set to 1 (objects that have been clicked), you need to click it again to set itt o 0, then second time to play it.
ReplyDeleteTry with creating 0 as default value while creating the variable. Haven't tried, a guess
DeleteHi - I need help to pause narration at points in the timeline without the user having to do anything. They will hit button to continue but I want narration to stop at particular points, prior to them doing that. Any help or advice would be appreciated.
ReplyDelete