Sound: Set Different Volumes For 2 Or Multiple Sounds?
Jan 19, 2003
Iam searching vor solution so adjust different volumes for multiple sounds. That means:
Sound1 Volume 100
Sound2 Volume 20
I have tried that with the following script:
DayNature = new Sound();
DayNature.attachSound("Day_Nature01");
DayNature.setVolume(100);
[Code].....
View 4 Replies
Similar Posts:
Apr 27, 2009
m using Flash 8. And I'm trying to adjust two sounds files using action script. First I set a sound file to 100, then I tried to set another file to 25 but when that happens, it also sets the first sound file to 25.
How do I adjust the second sound file so that the first one doesn't get changed as well.
By the way, here's the action script I was using for both sound files:
Sound File 1
background = new Sound();
background.attachSound("Kingdom Hearts Theme");
background.setVolume(100);
[Code].....
View 2 Replies
Mar 15, 2008
I have been at this for about 19 hours straight! I am going to go to bed immediately after this post, but for crying out loud, I have NEVER had this problem before today! Before anyone reads ahead and says 'you have to attach your sound object to a completely separate mc to be able to control it independently from all other sound/root volumes.' see if the following code accomplishes just that:
[Code]...
View 2 Replies
Sep 20, 2002
I've created a small application that links various Sound Clips to corresponding Sound variables, and the individual start and stop commands work fine. However, when I try altering the volume, the controls affect all the sounds in the movie. I'd like to refrain from creating separate SWF files to represent each sound, but I will if I have to.
View 1 Replies
Apr 16, 2010
I followed the mp3player tutorial (part 3) from [URL] and got it working fine. Only problem is that the setVolume I'm trying to use with my music is affecting all my other sounds - button sounds and background sound. I'm aware of the createEmptyMovieClip/attachSound approach and got it working on my other sounds. But Lee's tutorial-mp3player is using a slight different technique, and so my normal approach doesn't quite work.
[Code]....
View 7 Replies
Jan 5, 2010
I am using FLASH CS3.I have gone through many posts, seems to be an issue with many people.Still haven't come across a fix.Website made in FLASH. Flash movie loads and sound works great!I have a button with 'StopAllSounds' action script.[code]When I go back to main page... sound starts up again.Is there a way I can stop all sound regardless of where the visitor goes on the website?
View 2 Replies
Jun 30, 2011
I have imported my wav files to my library added them to the down state of my buttons and when I test the file I get (Sound has no valid device sound path although exporting device sounds was requested in the export settings. This sound will be ignored.) I have been surching for an answer but as of yet have found none.
View 3 Replies
Mar 10, 2009
Here's the setup:
-I have a music score that will be streamed in via actionscript
-I also have multiple short sounds (SFX) in multiple nested MCs
-these SFX sounds are customized using the ide edit interface, so it would be a pain to use actionscript to play each sound
What I need: To have 1 mute button for the music, and 1 mute button for the SFX, both on the root timeline.[code]...
View 7 Replies
Apr 10, 2010
As I have commented before I am building English teaching apps. I will have music playing in the background, words being pronounced and at times a surprise sentence. All three could sound at the same time at any given point. To build this properly should I use SoundChannel for all of these?
At the moment my code for the music loop is as so. The sound is in the library and exported for AS. Is this code fine or is it better to assign it to the SoundChannel class.
View 1 Replies
Jan 9, 2010
I made some sort of MP3 player based on an XML file, and I want to load the next track when pressed on a button. Well that part works, the problem is, when I play the next song, this is what happens:
- The next song plays
- The bar that is normally buffering is already full
- When I skip to a part of the song, it skips to the first song!
How can I "clear" a sound variable and load another one?
View 3 Replies
Aug 8, 2003
I made 2 sounds: background and button sound.This is the code:
_root.onLoad = function() {
backgroundSound = new Sound(this);
backgroundSound.attachSound("sound_root");
[code]....
View 3 Replies
Aug 26, 2009
I have an application in flash actionscript 2.0 that is running with several parts under each movieclips has an animation inside with a voice over. The problem occurs when I test the movie, the voice over/ sounds plays but when I click the pause button and play again the voice over/ sounds, sounds saggy and later on no sound will play.
View 3 Replies
Apr 29, 2011
that have more than 200 sounds , so I cannot just put the sounds in my libray in flash and then instanciate them as class and play them. Because the sound it will play when I click one object is not always the same.I have this function to play background sound , where enters the name of the song I wanna to be played :
public function startMusicBack(music:String):void{
var musicback:Sound = new Sound();
var bgChannel:SoundChannel;
[code]....
View 1 Replies
Apr 22, 2010
I'm having an issue with setting the volume on my sounds.
I have a number of movieclips, that when clicked on, play a sound. I have created an Event Handler for the movieclip, that when it is clicked on, the sound plays, but the setVolume is higher.
I also have background music, set a bit lower than the rest. Here's the issue, when I click on the movieclip that makes it's specific sounds go higher, the background music goes higher also.
How do I set the volume of my movieclip without it changing the volume of the other sound/s?
Here's the code:
Quote:
gameMusic.setVolume(50);
gameMusic.start(0, 500);
[Code]....
I want gameMusic to stay at 50, but it goes to 300 when I click on shark. Why would that change it?
View 1 Replies
Oct 22, 2010
how to create a mute button successfully but only with the global sound setting (so all sounds mute or play). What i need to understand is how to use the Sound class to control individual streaming sounds.
I have 3 sounds and 3 buttons. The 3 sounds correspond to clapping, vocalizing, and the instrument playing, all of the same rhythm. I want the user to have the ability to hear all 3 at once and toggle on and off (muting, not actually stopping) each sound via the respective buttons.
I cannot call the sounds dynamically, because I need them embedded (streaming) to sync graphics with them (the names of the beats change color with each drum beat) and need to see the sounds graph in the timeline. What I want is for all 3 sounds to start simultaneously, all syncing with the same graphics on the stage, and for the buttons to toggle mute/unmute for each individual sound, so that the user can hear them all, only 2, or just 1 at any point, without ever stopping the looping sounds.
This is the code I have that is working for muting all the sounds, but I have no idea how to target the individual sounds instead. The following is only for one button, but there will be 3 buttons, one for each sound:
Actionscript Code:
function setMute(vol){var sTransform:SoundTransform = new SoundTransform(1,0);sTransform.volume = vol; SoundMixer.soundTransform = sTransform;}var Mute:Boolean =
[Code]...
I realize the SoundTransform is what applies it globally. How do I reference each sound individually?
View 2 Replies
May 26, 2011
I Am wondering if is possible to use one sound channel to play through an array of sounds? Perhaps by using a complete event or other means?
View 1 Replies
Dec 23, 2011
[code]I am making a soundboard and I need the code to stop previous sounds if I click on a new sound
View 3 Replies
Jan 30, 2009
I have some sounds on buttons:
Code:
var mySound:Sound = new myLibrarySound();
myButton.addEventListener(MouseEvent.CLICK, playSound);
function playSound(e:Event):void
[code]....
... and that works fine. I then have some streaming music:
Code:
var myStream:Sound = new Sound();
myStream.load(new URLRequest("myPath.mp3"));
myStream.play(0);
... and that works fine too. Now, however, the initial button sounds have a slight delay -- I'd estimate about 150-250 ms. It's enough that rollover click noises happen about the time you click, and click noises happen about the time you release, etc. Now, here's the KICKER. It only happens in FIREFOX. CURSE FIREFOX. Seriously. I've been having so many Flash issues in FF3, it just drives me nuts. Firefox and wmode is a pain, Firefox and sound is a pain, Firefox has been crap for Flash development lately.
View 2 Replies
Jun 12, 2010
I am trying to create a soundboard and I have all my buttons and stuff, the only thing left is to put the sound files in. However, I have tried adding them to the library and dragging and dropping them over the HIT option like I usually do, but when I export the swf file, the sound file sounds terrible, it crackles and sometimes stutters a bit. I have tried setting these sound files to mp3 and raw in adobe options but with no luck. I am using actionscript 2.0 if that has anything to do with it. Also, I need these files embedded, not just linked.
View 2 Replies
May 5, 2004
How can I change the following so it won't conflict with sounds inserted manually in keyframes. Currently when this function is active, the loop sound works but the other sounds don't play..
[Code]...
View 13 Replies
Aug 5, 2010
I am making a slide show, for every image i want sound on it. For example if it the "Tiger" in the image, it says "Tiger". I have all the voice in .wav format.
Right now my slide show is xml based and in as3, i have made another attribute for voice.
Let me know how i can play different sounds for different images.
View 5 Replies
Sep 3, 2010
Working on a project with multiple sounds (all contained in different MCs) played by different key board events. Most of it works, but when I try to use simultaneous 2 button combinations to call upon a different sound, all 3 sounds play at once. The 3 sounds are as follows: the sound associated with the first button, the sound associated with the second button, and the sound associated with the 2 button combo. I've made several different true/false statements to override different events and states, but they don't affect the playing of the MCs. I've also tried using attachSound but I don't like the results I'm getting from that either.
How can I stop the first 2 sounds from being played, so only the 3rd sound can be heard?
View 2 Replies
Nov 11, 2005
im am using this script in my current movie to attach sound using acttion script it also has a stop/start button but i need to now how to add multiple sounds in this way.
[Code]...
View 2 Replies
Jun 11, 2009
In my app, scenes on the stage play based on user interaction, and are accompanied by sound clips that are loaded through a soundLoader class (see below). I can play the correct track from the model, but I can't figure out how to correctly write a loadTracks function that will proload all of the track options for a given scene, and then play the correct one based on what the user clicks without a pause. How would I preload and store those sounds in a way that I can use them when needed?
Code:
package mvc
{
import flash.display.*;
import flash.media.*;
import flash.events.*;
[code]....
View 2 Replies
May 14, 2009
I have 10 sound files in an array.I am wanting to preload all of them and update a counter once each one loads sucessfully.So when song 2 for instance finishes loading then the counter would be at 2,then 3,etc....I think maybe I need to use a while loop to hook each sound into a load event?
View 1 Replies
Sep 6, 2010
Inspired by Andre michelle, I`m building a tone matrix in AS3.I managed to create the matrix and generate the different sounds. They donīt sound that good, but Iīm getting there One big problem I have is when more than one dot is set to play, it sounds just horrible. I googled a lot and found the additive synthesis method but donīt have a clue how to apply it to as3.anybody out there knows how to play multiple sounds together? any hint?
View 2 Replies
Nov 17, 2011
Are there any audio management libraries for ActionScript 3? The more tailored they are for game development the better.I'm finding it hard to understand and work with multiple channels, which is making a lot of my audio sound screwy and cancel each other out, etc. I've been working on an RPG that can at a given time have quite a number of sounds playing such as environmental noise (like opening doors, thunder, rain, etc), walking enemies, inventory sounds (for events like dropping an item into your inventory), passive spell-casting sounds, voice clips, weapon swinging etc. Alternatively, if there are any good resources that explain how to use multiple sound channels strategically.
View 1 Replies
Apr 10, 2003
I need a little advice. I've got a set of swfs that are all part of one training, and within these movies are a few sound effects attached to button instances. I want the user to be able to click a button to turn the sound on or off at any time during the training.
My first idea was to create a variable called wantSound, which each sound instance checks before deciding to play. This is working perfectly. There's a toggle switch on the main timeline that sets sound to on or off, and when a sound is supposed to play, it checks to see if wantSound=true, and plays, or if it is false, it does not.
This works fine on each individual .swf, but when a new .swf loads in, the sound defaults back to true, and the user has to turn it off again. I imagine this could be fixed by loading each movie into different levels instead of loading them into level0 or root, but as this is not how I originally created the file, that will take a lot of work to handle aligning the loaded movies and parking them (making sure none of the buttons are active on the level below). I'm lazy, what can I say? :-)
I've been looking around at similar questions, and found a decent tutorial on Macromedia's site about using javascript to pass a variable from flash to HTML. I went through that, and managed to get Flash to send my wantSound variable to HTML with no problem. Check here for the tutorial.
The only problem is that in macromedia's example for sending data from HTML back to Flash, they use a text field for getting the variable. I just want to take the variable sent from Flash to HTML and send it back to Flash when requested (at the beginning of the next SWF.)
View 1 Replies
Dec 17, 2005
I have set this:
Code:
mp3_1 = new Sound();
mp3_1.loadSound("1.mp3", true);
mp3_2 = new Sound();
mp3_2.loadSound("2.mp3", true);
[Code]...
View 2 Replies
Jan 22, 2009
I have figured out how to play a sound with AS3, but i cannt figure out how to use multiple sounds. to play a single mp3, i am using this:
Code:
//number that is redefined when the pause button is hit
var pausePoint:Number = 0.00;
//a true or false value that is used to check whether the sound is currently playing
[Code]....
but what I need to do is have 4 different mp3's, each with its own stop & play button, so the user can play any file they want. These are voice over reels, not music, so each needs its own set of buttons.
View 1 Replies