From your description it sounds like you are not using sound objects for each of your sounds. You can have 8 sounds playing at any time using sound objects. Each sound can then be independently controlled. The sounds can be imported into the movie, or they can be loaded from a server at runtime.
A very simple alternative to using sound objects is to place the sounds into their own individual movieClips and play and stop those movieClips. If you are using SoundMixer.stopAll(); that will always stop all sounds from playing, so you don't want to use that.
Thanks very much for your prompt reply. This is when I start to get fuzzy, however, as official flash terms are tossed around, haha.
Perhaps if I tell you what I've done thus far, you'd get a better idea of what I'd like to do.
This soundboard has over 100 'buttons', each a separate piece of dialogue. All of those sounds (buttons) are controlled by a 'stop' via spacebar action. All of that works just fine.
What I would like to do, though, is have a button that activates a loop of background noise (office sounds, in this case) that the user can deactivate at any time by clicking it again. That's where my difficulties are arising.
In spite of trying to use the code snippet for a mouse-click start/stop for that background noise button, it still gets deactivated by the spacebar. I think perhaps that the sound isn't properly identified in the code and maybe that's why it isn't working. I get confused when looking at the code and seeing the terms I don't fully understand.
Thanks for the insight about the 8 sounds playing at any time. That means I should fall well within that, as I would, in theory, only ever have one piece of dialogue activate while the background sound is also playing. Do I understand that correctly?
Thanks again for your help, Rob. I really do appreciate it.
It would really help me if I could see your actual movie. It sounds like you are stopping the playback head on the main timeline with your spacebar action. Is that correct? If you can't show me the whole movie, can you show me the code that you are using with the spacebar?
Hi again, Rob.
I'm going to start with a really dumb question, if you don't mind.
Is anything created in flash considered a 'movie'? I ask because you've asked to see the movie, whereas I just think I'm creating a soundboard. Is a soundboard simply a flash movie in another format, as it were? Sorry for such inane questions, but I like to pick up the correct knowledge and understanding wherever I can.
As for the code that's controlling the spacebar 'stop' action, here it is. Looking at it again, I do see the 'stop all' portion of it and I know you mentioned that earlier. So I'm wondering how do you create an 'exception', as it were, for the background noise I'd like to control with a mouse-click. Anyway, one thing at a time, I guess. Here's the code:
if(e.keyCode == 32) SoundMixer.stopAll();
Thanks again for your kind attention to my problem, Rob. I really do appreciate it.
1 person found this helpful
The output from Flash, an .swf file, is commonly called a Flash movie.
Using SoundMixer.stopAll(); will always stop all of the sounds that are currently playing. There is no way around that except to not use it. In order to get the flexibility that you want to have, you'll have make your movie more complex. Without actually seeing the file, It's difficult for me to tell you how best to improve what you have.
If, for instance, you just have a bunch of sounds and a bunch of buttons to play each sound, you could accomplish this with some relatively simple actionscript.
Ok, yeah, I'm familiar with the .swf extension now, having made a few soundboards already, so now I know they can be referred to as movies. Thanks!
As for this project, it really is just a collection of 'buttons', with each of them being a different sentence or sentence fragment. The spacebar action is handy if you want to stop 'mid-sentence', as it were. So essentially what I'm trying to achieve is to have background sound playing, while still being able to activate/stop the soundboard buttons. In my jumbled head, this means the background sound should follow a different rule than the buttons, yes? I just don't know how to go about doing that properly.
So, you say it IS possible to achieve what I'd like to do?
edit: I should add, I'm confused when it comes to what a 'sound class' is. In my attempts at trying to do what I'd like to do, I've run into that term and I really don't understand what it means.