Solved

Stopping sound in a more efficient way?

Posted on 2011-02-15
2
183 Views
Last Modified: 2012-05-11
Hi,

I am currently working with student creating flash project and when they use sound on a page they declare an instance of a sound channel with a variable name i.e. SC1, SC2 etc for each song needed. At the moment to stop all the sounds when a user presses a navigation button rather than the stop button first, im adding the code SC1.stop(); SC2.stop(); etc onto each button event. If a student has a number of songs on one page and a number of navigation buttons to move away from the page is there an easier way to stop any and all sound channels when any button is pressed than could be declared just once on each page rather than using the same code in a number of different events on the same script.  

Thanks
Regards
Karl
0
Comment
Question by:Karl01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Accepted Solution

by:
deepanjandas earned 500 total points
ID: 34906126
Try this:

import flash.media.SoundMixer;
SoundMixer.stopAll();

Warm Regards
Deepanjan Das
0
 

Author Closing Comment

by:Karl01
ID: 34909693
Excellent solution.

Thank you very much
Karl
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
Suggested Courses

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question