ActionScript 3.0 :: SoundChannels Will Not Stop Sounds When Stop() Is Called

Sep 10, 2011

On a recent project I am working on, I created an event-based sound engine. Different components within Flex will be registered, and then the controller will listen to events and handle the information correctly. So, it just takes a custom SoundEvent or ChannelEvent to alter one of the channels, or play a sound.
 
I can not quite figure out what is wrong with my code, and I am finding myself snow-blind to the issue at hand. At first, I was going to rewrite it but I figured it would be better to learn from my mistake. Also, I realize that this is not correct for streaming sounds, but I am working off a local sound library until I get it up and running smoothly.
 
Here is the code for the SoundEvent:

package code.events
{
import flash.events.Event;
public class SoundEvent extends Event

[code]....

View 3 Replies


Similar Posts:


ActionScript 3.0 :: MyTimer.stop(); In The Fuction The Listener Called (to Stop It) It Dosent Stop?

Jun 12, 2009

I thought I had a handle on the timer class (even just a beginners understanding), but I'm having trouble with it.I have an event listener for the timer and it starts fine i get a delay, then a tween,but when I place a myTimer.stop();in the fuction the listener called (to stop it) it dosent stop.it will repeat placing the first image, and then call the first function again

......Wait its placing the first image in (a couple of lines before the start), so Its restarting the whole movie, not just the function?

myTimer.addEventListener(TimerEvent.TIMER, tweenone)
myTimer.start();
function tweenone (event:Event):void[code]...........

View 6 Replies

ActionScript 2.0 :: CS3 Getting Sounds To Start Again After Using Stop All Sounds

Nov 29, 2009

I have a film with 4 scenes in it: Here's a link to the film and as you can see the film does not play the music the second time because of the StopAllSounds function which is probably the wrong code to use. The first scene is just a button with 1 frame, a stop action and a music clip. The second scene is the film. The third scene is the credits fourth scene is a Play again button. I have a Stop all Sounds action on the fourth scene because if I do not use it and I press the Play Again button, the music from the first song keeps playing but also the music from the film starts up again so it starts to play twice. What I want to know is, how do I get the music to stop at the end of the film but start up again once I hit Play Again?

I am using Flash CS3 if that helps and using Actionscript2.

View 2 Replies

Stop All Sounds Permanently

Mar 21, 2012

im using stopAllSounds();command to mute all sounds, and it works fine with sounds that are already loaded (background music), but if there is button which triggers some new sound (after activating mute button ) or any other function to import new sound object you still can hear it despite stopAllSounds();.which command to use to permanently block all sounds already loaded and those which can be triggered by future actions.Now i have stupid situation> background music is muted but you can still hear sounds when cliclking buttons (which is ok but NOT in muted stage).

View 5 Replies

ActionScript 1/2 :: Stop All Sounds?

Oct 31, 2009

i load external swf to the main movie. They all have sound. Have no problem to stop sound of the main movie (by the behaviors), but it doesnt stop the sound of the external one. What AC should be used to stop all sound, external and internal?

View 1 Replies

Actionscript 3 :: Stop All Sounds But One?

Mar 31, 2010

I posted a question earlier about stopping all sounds in a swf. Now, to do that I'm using the following code.

var transform1:SoundTransform=new SoundTransform();
transform1.volume=0;
flash.media.SoundMixer.soundTransform=transform1;

Which solves the problem (mutes all sounds) but now there is an issue, I want to stop all sounds but one.

View 2 Replies

Flex :: How To Stop Sounds

Jul 2, 2010

How to stop this sound ? :MySound.play(0,100,null);

View 2 Replies

Stop All Sounds For A Flash Control?

May 4, 2009

I need to turn off/on all the sound for a flash animation. The flash control contains a layer named sounds that has 5 sounds associated with it in keyframes at different time. How can I simply turn on/off everything using a symbol button.

View 2 Replies

ActionScript 1/2 :: Stop Sounds In Web Site

Dec 30, 2010

I have sound that loads with the web page. Because I want to give the user the ability to mute the sound, I have a flash button to do so which works nicely.
 
However, if the user moves to a different page in the website, they must again mute the sound.

Is there a way to set a global variable for muting the sound that will work across the entire website?

View 1 Replies

ActionScript 1/2 :: How To Stop All Sounds In Root

Jan 26, 2011

I found the following script for a button which let me  stop all mc inside the root but I need to stop all sounds in the root as well.

[Code]...

View 1 Replies

ActionScript 1/2 :: Stop And Start Sounds

Jan 28, 2011

I have a Flash presentation that has some music and various sounds throughout the presentation.I want to have a btn stop all the sounds, but if clicked again it will enable all the sounds again.Is this possible? I can get the btn to stop the sounds, but cannot get the music to enable after.

View 1 Replies

Flash :: Stop All Sounds Permanently In AS3?

Mar 30, 2010

I have a main swf which has sound on/off buttons. It has many SWF's which are loaded into different placeholders at different time. All of them have different sounds in them. In addition to that there is a music loop going on in the background.Now, this perticular swf lets call it Father will be placed in some swf later on. What I'm trying to do right now is when the sound off button is pressed turn off all the sounds permanently so the child swf's and their sounds stop too.I have found a way in AS2 :

global = new Sound( ) //no movie clip target path.

and add the following code to your off button.

on(release){
global.setVolume(0); //mutes all sound
}[code]....

which ofcourse does not work for AS3. So how can I stop all sounds permanently in AS3? Secondly what if I have one sound (my background loop) which I want to keep going on.

View 2 Replies

ActionScript 1/2 :: Stop And Start Sounds?

Oct 1, 2011

I have a Flash presentation that has some music and various sounds throughout the presentation.I want to have a btn stop all the sounds, but if clicked again it will enable all the sounds again

View 1 Replies

ActionScript 2.0 :: Stop The Same Number Being Called More Than Once?

Jun 2, 2006

I have this simple bit of code which is used regularly in my movie...

minNum = 1;
maxNum = 200;
number = Math.ceil(Math.random() * (maxNum - minNum + 1)) + (minNum - 1);

Is it possible to add something to this code to stop the same number being called more than once?

View 1 Replies

ActionScript 2.0 :: Stop A GotoAndPlay() From Being Called?

Jan 1, 2004

I have a MovieClip.gotoAndPlay() statement in my code, but for some reason there is a chance that the statement will be completely ignored. When it's ignored, my movie acts as if the statement was never there, and I can't see a pattern in when my movie ignores the gotoAndPlay(). It seems like it just doesn't gotoAndPlay() when it feels like it.Anything that might stop a gotoAndPlay() from being called?

View 2 Replies

ActionScript 2.0 :: Using StopAllSounds(); To Stop All Background Sounds?

Mar 11, 2009

I am using stopAllSounds(); to stop all background sounds when i enter specific frame in my main movie and it works fine but how do i get sounds to continue to play when i exit this specific frame?

View 1 Replies

ActionScript 2.0 :: Stop All Sounds In Flash Project?

Aug 13, 2009

I have a question for stopping all sounds in flash project. And i mean all, buttons, effects, etc..The thing is, I have manually placed various sounds on different frames, on different MCs and buttons inside my flash.Is there any function that will just mute my sounds, or I have to create object for each sound?

View 1 Replies

ActionScript 2.0 :: Stop All Sounds Except Background Music?

Feb 20, 2011

I have created a simple soundboard, with multiple buttons that play sounds upon release. These sounds are embedded within the 'hit' frames of the buttons. Only one can be played at once, so this has been applied to each button:

on (press){stopAllSounds ();}

This all works as planned so far. However, I would like to have a background music feature that would be exempt from the "stopAllSounds" command and thus able to keep playing regardless of what buttons were pressed (or until a designated stop button was pressed).

View 2 Replies

ActionScript 3.0 :: Stop All Sounds Except Background Music?

Jun 17, 2011

I am working on a website that has 11 sounds in one frame. All of the sounds are external, meaning I have to call each one of them every time I want them to play, which happens when I click on specific MCs in my stage. Each MC I click all sounds stop and the new one starts playing. So far, so good.

But therein lies the problem: I want this to happen but keep background music playing. I have no idea where to start from.

View 1 Replies

ActionScript 3.0 :: Stop All Sounds And GoToAndPlay Label

Sep 24, 2008

in AS3 to allow a movie clip to stop a Sound Object as well as going to a label and playing it. I'm a graphic designer trying to get a handle on AS3.

View 10 Replies

ActionScript 3.0 :: Stop All Sounds On Button Release

Jul 11, 2010

Im making a soundboard and I chose AS3 by accident.What I need the code to do is STOP the CURRENT sound from playing if another is pressed. the code that worked for AS1 and AS2 was onMouseDown [code] plays the sound once and messes the sound up after playing for only half a second or not at all.

View 5 Replies

Professional :: Play FLV And Stop All Other Webpage Sounds

Sep 5, 2010

I have a website that has two flash items on it. I have a swf that calls mp3s that plays on the page load, and I have a FLV that plays on page load. What I would like to happen is: on page load the FLV plays when the FLV Finishes the swf starts to play the mp3s. What already happens is that the pages load in _blank pages so they are in new windows. This is good because while you navigate the site, the music from the homepage is still cycling through the swf's mp3 playlist. The problem comes in when you navigate back to the homepage from a new window, and the homepage is still open within the first window. That means that the video plays over, while the music is playing, and the music doubles up. Now the video playing isn't bad, it's that music is doubling up. Can't it sense itself playing a 2nd instance of itself on another webpage and stop it?

View 3 Replies

Stop All Sounds For All Flash SWF Embedded On A Page?

Jan 23, 2012

I have 100 swf embedded in a page. The swf are various forms of individual audio playbacks.- an swf button that loads an swf into it that has audio on a timeline streamed. AS3
- swf that has streamed audio using scripting so there is no preloading. AS2Since I have 100 and the user could press all 50 at a time and have this giant noise of sounds and bog down their bandwidth. Is there anyway of:- stopping all playing of swfs that has streamed audio using timeline. I guess that could be like a ALL stop frame command??- stop all sounds coming from the streamed audio swf

View 11 Replies

ActionScript 3.0 :: External Swf Sounds Will Not Stop When Unloaded

Jun 23, 2009

Main swf loads an external swf which has a linear voice-over. User can watch/listen the whole 5 minute piece and then main movie carries on OR User can click to go on without viewing/listening to the whole show. Using removeChild, I can kill the visuals, but the voice track still goes on. i added a SoundMixer.stopAll line, and it does kill the current VO clip, but the next one will play in a few seconds. In the external swf, i'm using timers to delay slide advancement while the voice over plays. Seems like I came across some info that says I cannot fully unload like this with timers in my external swf.

Does this sound like a plausible source of the problem? If so, what is the best way to kill/nullify the timers in the external swf?

View 1 Replies

ActionScript 3.0 :: Using A Button To Stop All Sounds From External SWF?

Nov 16, 2009

I did a search here and I am not sure my question was answered exactly, and even if it was, I wouldn't know it. My problem is going above and beyond what the project calls for. So here we go:I have an external swf that I have loading in when you press a "play" button. Now I need to have a button that stops the sound ONLY on the externally loading swf. I assume from what I have Googled to death that this is called "stopping all sounds". I have also come upon a sound mixer dealy-o, but I'm not sure that is what I am trying to do?????I keep reading about SoundMixer.stopAll (); but this looks to mute the sound all together with no use of a button. So I am ASSUMING that there is more code to add to this when it comes to using a button.

So, I would like to know the EXACT code I need to use to get it working...if at all possible. I named my sound button "btn3_btn" and my mute button "btn4_btn" for now. I want a separate button to turn the sound back on once it has been muted.

View 9 Replies

ActionScript 3.0 :: Start / Stop Sounds On Button Not From URL

Sep 2, 2011

im using actionscript 3 with a button to play a sound, the only thing is I dont want to play the sound from a URL i want to play it from a sound imported into the library, im sure its simple I just dont know how.

[Code]...

View 7 Replies

ActionScript 3.0 :: Flash - Put Sounds Into An Array And Then Stop Them?

Mar 17, 2012

so I'm unclear about how to set up variables. I prefer to play sounds from my library using linkage,pass an array of sounds into the SoundChannel, so that I can stop them all at once?t's for a 'toggle voiceover' button, so perhaps better to use Sound transform to mute the Sound Array.This is what I have so far. (Page1 etc is my linkage sound name)

Code:
var GlobalVoice:Array = ["Page1", "Page2", "Page3"];
var Globalchannel:SoundChannel = new SoundChannel();

[code]......

View 8 Replies

Professional :: Can't Stop Sounds Embbed In Movieclips Timelines?

Apr 29, 2010

I searched everywhere but no answer.i have a main Movie containing many movieclips with sound  atttached in their timeline. When i change to a different frame from my  main movie ( Main Timeline) the sound from my old movieclips continue to play. It seems that sounds are still in memory and clips are not garbage collected.I've tried unloadAndStop from CS4 with flash player 10 but still the same problem? my movie clips will continue to play sounds in different frame from maintimeline

View 4 Replies

ActionScript 2.0 :: Stop All Sounds With XML Template External Link?

Aug 13, 2009

I have one of these XML driven Flash templates and I have several links that open _blank pages, I would like to stop the background music when they are clicked. I know I need a root stop all function and I think I would then define that function in the <link></link> tag in the XML...

View 0 Replies

ActionScript 2.0 :: Toggle Button Mutes (not Stop) All Sounds?

Aug 14, 2006

Could someone direct me to a post (or explain) how I might be able to Toggle On/Off the muting of every sound playing in my .Swf?

I have several streaming sounds I don't want to (stop), just (mute).

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved