ActionScript 2.0 :: Loop - Set Volume Down Just For One Sound?
Sep 20, 2006
can anyone tell me how to loop 5 different sounds, drums, bass, sax etc. When i use :
[Code]...
and play them all, it's ok, looping fine, but what i want to do is to have 5 buttons that control those 5 sounds. turning of and on some of them... i tried with "secondSound.setVolume(0)" to turn off 2nd sound, but that kill them all... CAN i SOMEHOW set volume down just for one sound? OR if thats not possible, i need bass or sax sound to start again, when button is clicked, in the same position where drums sound is...
but when loop start again to start also from "0" i've also tried reading firstsound position:
[Code]...
View 1 Replies
Similar Posts:
Feb 1, 2010
I'm building a video player and am kinda stuck at the volume slider part. It's a YouTube style vertical slider, meaning if the slider is in the top position volume should be 100% and if the slider is dragged to the bottom position sound should be 0. Currently it's doing the opposite of what I want :(
Dragging the slider down will make the sound louder, while dragging up lowers it.
Here is my code below dealing with the volume slider.
[Code]....
The (-4) is an offset value so when you drag it all the way to turn it off, it's 0 and not 4. I need to reverse this somehow, so the traces above will swap... going down will make userVolume = 4 and going up will make it 30.
View 4 Replies
May 22, 2009
I have an application with a collection of sounds in the timeline. One sound file is recorded at a slightly lower volume than the others. I know I could change this in Audacity but I'm wondering whether I could attach a line of actionscript to its button to raise its volume slightly.I know its possible to do this when playing sounds with actionscript directly from the library, but that would be too big a departure from the development style used.
View 1 Replies
Dec 23, 2008
If I have library song playing using a simple code like: var mySong:Song = new Song();mySong.play(); How do I use a button to control its volume so that each time it is clicked the volume goes up or down by a little.
View 14 Replies
Jun 24, 2009
Is it possibleto get the sound volume of of a specific frame or specific time of sound item with the Flash Javascript API maybe together with Action Script?
View 1 Replies
Aug 26, 2010
I'm trying to set a volume to my external sound. I'm using the following code, there're no errors, but the volume is not affected...
var req:URLRequest = new URLRequest("squeeak3.mp3");var sound:Sound = new Sound();var controller:SoundChannel = new SoundChannel();var myTransform = new SoundTransform();myTransform.volume = 0.2;controller.soundTransform = myTransform;
View 3 Replies
Aug 11, 2011
how to control sound volume via AS3?[code]
View 4 Replies
May 17, 2011
How do you change sound volume?
Code:
Select allimport flash.events.Event;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.SoundTransform;
import flash.events.MouseEvent;
[Code] .....
View 2 Replies
Apr 5, 2006
I can't seem to figure out how I set the volume of a single sound object. Everytime I use setVolume on a sound, it is applied to *all* sound objects playing The code that I'm using :
Code:
music = new Sound();
music.attachSound("music");
[code].....
View 1 Replies
Aug 29, 2008
Every piece of info I can find about how to set the volume of a sound in Flash with setVolume, mentions that you need to reference the movie clip where the sound is stored....to target just that sound, and not the whole timeline.Is there a relatively easy way to set the volume of different sounds that are loaded into the same movie clip? I'm loading my sounds with AS on the first frame of my movie, and would prefer not to have to create separate movie clips for each sound..
View 2 Replies
May 3, 2010
I'm having issues with controlling multiple sound volumes in flash. What I need to have happen is a Background music softly playing while a voice over is also playing.
This is what i have in the first frame of my main timeline
Code:
firstSound = new Sound(BGMusic_mc);
firstSound.attachSound("LatinRockMusic");
firstSound.setVolume(10);
[Code]...
but when it starts to play the voice sound the volume jumps up to 100. I need the first sound to stay at 10 and the voice sound to be at 100.
View 2 Replies
May 9, 2009
I have several sounds of same length playing on the Timeline, each playing in loop on their own layer so that they can be syncronised on the same tempo (i did not managed to do this through pure AS3).
Is it possible to manipulate the sounds on this timeline individually via actionscript (ie: add listeners, change volume, read position) ?
View 5 Replies
Aug 23, 2009
i've discovered that the only way to sync loops adequately in flash is to put them together on the timeline.
is there any way to change the volume of each layer with actionscript? i'd like to dynamically mix between loops.
View 4 Replies
Nov 19, 2007
I have a timeline with a sound in it set to sync because I am scrubbing the main timeline.... I now want to control the volume of the sound in the timeline..is that possible in AS3??
sometime like : var my_globalSound:Sound = new Sound(stage); that of course doesn't work, but how would I get access to the sound set in the timeline...
View 6 Replies
Mar 10, 2010
I'm very new to flash and i've made a movie for a website [url]... and i want to set the sound to 0 on my mute button at the moment i've put [code]...
View 1 Replies
Nov 22, 2010
I have one mp3 file in the time line. How to controle set volume
View 1 Replies
Mar 7, 2011
I have a sound running on a timeline and I want to have an AS2 script that will reduce the volume by, say 50%, and have the reduction in volume happen over a number of seconds so it is not an abrupt change.
View 1 Replies
May 25, 2011
What Im looking to do is decrement the volume level on each iteration of a looped sound.[code]How do I check each time it loops? I'm currently storing all playing sounds by ID inside a Dictionary object. Keep in mind that there will be different sound playing. I wasn't sure if I should be using a SoundChannel here either.
View 2 Replies
Feb 23, 2011
Searching for how to change the volume of sounds, I always get this irritating snd=new Sound(URLRequest), followed by snd.setVolume(val). Oh, fine, but my sound is not an URLRequest, it's an embed.
I've made a lot of random attempts (1) to no avail. How am I supposed to do that instead?
(1) including casting my class to Sound, creating a Sound with the embed class as argument, creating a SoundTransform and setting it to the channel, etc.
View 1 Replies
Jul 20, 2009
However, is there a way to control the volume of a timeline sound?
View 7 Replies
May 25, 2011
Im having trouble try to decrement the volume level of a sound after each loop. I am playing the sound just like this (not in a SoundChannel):
ActionScript Code:
var playCh:Dictionary = new Dictionary();
//....
private static function loopMySnd(id:String, loopAmount:int):void{
[code]....
The problem is that the COMPLETE only picks up the first time the sound cmpletes playing and not the second or third. How do I check each time it loops? I am currently storing all playing sounds by ID inside a Dictionary object.
View 2 Replies
May 27, 2011
Cannot read property (or target) a Sound thats playing in a SoundChannel.... in this case I am refering to a class the extends the Sound class (SoundEffect class), that is currently playing in a SoundChannel. Each SoundEffect has a volumeLevel property that I would like to restore once I have unmuted the SoundEffect's in my application. I cannot figure out how to target that property once its playing in the Channel.I am extending the Sound class:
ActionScript Code:
public class SoundEffect extends Sound {
public var ID:String;
[code].....
View 9 Replies
Jun 23, 2007
I am trying to make a volume control in my flash movie with actionscript 2.0 Here is my code:
[Code]....
but the problem is the first time I lanch my movie it comes in a good volume.As soon as I hit the up or down button to lower or increase the volume firts the volume goes down a lot and then starts to increase or decrease its volume.
View 2 Replies
May 12, 2009
I have to buttons that control the volume. They work fine just that I want to stop when the volume hit 100 and also when you go down to stop at 0. Right now it will go up and down then start the opposite way. I am not quite sure how to stop that(with a if statement).
[Code]...
View 1 Replies
Jul 24, 2011
Is there any code in as3 that sets the volume by x&y- coordinates of the mouse?So that my sound is in a MC, and how closer my mouse is at the MC, the louder the volume gets?
View 4 Replies
Dec 18, 2003
I have some sounds in movie clips, this is because that is the only way to be able to select SYNC Stream mode (to keep the movie in sync with the narration). Thus I don't want to use Sound Objects because they can get out of sync... Is there any way to control volume (so I can mute) without using Sound Objects?
View 2 Replies
Oct 23, 2004
In a movie a have a sound object, that i make it through (for example)
Code:
musica = new Sound();
musica.attachSound("fondo");
I have many other sounds in the movie but this object is for a loop... The problem is that when I set the volume for that object, through:
Code:
_root.musica.setVolume(0);
Or whatever value, all the other sounds are set to that volume too. I just want to mute the loop but also the buttons sounds are muted...
View 4 Replies
Jan 21, 2011
When I try to play a sound via Actionscript repeatedly, it gets louder when you do it really fast. The crux of the code that did this is pretty simple:
Actionscript Code:
buttonGreen.addEventListener(MouseEvent.MOUSE_OVER, reactionGreen);
private function reactionGreen(e:MouseEvent):void{
blob = new blob_cls() as Sound;
blob.play();
}
I made a .swf that shows what's happening. If you roll your mouse over the button repeatedly, you find the sound getting pretty loud. [URL]. My webpage isn't very stable, so this might be better. The volume seems like it could go up to 2 times louder than it originally is..
View 2 Replies
Apr 4, 2011
I'm working on a project for my Flash class that seems to be above everyone's heads. What I'm trying to do is figure out how to take sound from a microphone, register the level/volume of that sound in flash. So if the level is 25 then a movieclip and a different sound is played back. Problem is I don't know what coding I can use to register a microphone and take whatever sound is put into the microphone and display a movieclip.
View 13 Replies
Jun 4, 2011
I have a Flash CS4 project with sound that starts to play in the first scene, set to event/loop so that it plays all through the entire time.
But I have a piece of video with audio in another scene and I would like to have the sound file playing at a lower volume while the video is playing, then get it to return to normal volume when the video is over.
I have no actionscript at this point. Just timeline animations, etc.
View 7 Replies