Solved

Stopping sound in a more efficient way?

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Firefox video player - embedded native versus VLC player 3 1,075
Flash doesn't load in Iphone and Ipad 22 486
Flash Player White Screen Facebook 5 762
Action Script commands 5 239
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…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
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.

770 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