Stop All Sounds

Working with Media (graphics, audio, video) & other Assets

Moderator: Nav

Stop All Sounds

Postby monmouthrider » Fri Mar 18, 2011 7:42 am

Hi,

Is there a simple away to stop all audio playing like the Flash 'stopAllSounds'.

I have a lesson which contains 9 audio files. File one plays on page load. Then there are seven buttons which each trigger various displays and include an audio file for each button. Finally when all seven buttons have been accessed a final audio file plays. I have actions and variables controlling what happens initially on page load and also to check that the individual buttons have been used before the final audio is triggered.

My problem is with the audio attached to the seven buttons. I need a way to stop any audio currently playing if the learner clicks a second button whilst the audio from the first button is still playing. I could put actions/responses on each of the seven button 'on click' to 'hide' the other six audio files should they be playing but its a lot of work when one command at page controller level to stop all sounds would do.

Trevor
monmouthrider
 
Posts: 30
Joined: Fri Mar 04, 2011 8:36 am

Re: Stop All Sounds

Postby Nav » Fri Mar 18, 2011 12:13 pm

Hi Trevor,
There is no stopAllSounds method. The closest thing is the Page Controller > setAudioVolume to 0. But that doesn't pause anything.

You could create your own action to handle this. Basically you have an action that is triggered by any one of the button clicks, and pauses all the audio. It's important that action is moved to the top of your Action List, as you want to pause everything before you start playing any particular audio.

(action is below the fold in the image).

pause_all_sounds.png
pause_all_sounds.png (60.56 KiB) Viewed 6876 times

- Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: Stop All Sounds

Postby monmouthrider » Fri Mar 18, 2011 1:06 pm

Thanks Nav. I had not considered putting them all in one action 'on click ' action
and running it first before the other 'on ckick' actions
Cheers
Trevor
monmouthrider
 
Posts: 30
Joined: Fri Mar 04, 2011 8:36 am

Re: Stop All Sounds

Postby Nav » Mon Mar 21, 2011 10:55 am

Great! (sorry, getting the last word in here, so I can easily determine which topics I've answered, and which are still unanswered).

- Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm


Return to Media & Assets

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Not able to open ./cache/data_global.php