Solved

Stopping sound in a more efficient way?

Posted on 2011-02-15
2
178 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
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
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.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now