Solved

Stopping sound in a more efficient way?

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can't get text from a text entry 13 285
Action Script commands 5 241
bandwidth 5 74
word is recognized as adobe and adobe as IE files 14 51
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
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 select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

791 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