ActionScript 3.0 :: Volume Is Not Changing In Slightest

Dec 28, 2009

I'm currently having problems using the volume property of the SoundTransform class to change the volume of the sound effects played in the game I am building and was hoping someone here would be able to point out what I'm doing wrong. Essentially I am setting the volume property to various values between 0 and 1 but the volume is not changing in the slightest!

In the main menu of the game there are two slider bars that can be used to adjust the volume of the background music and sound effects respectively. When the user moves the slider a value between 0 and 1 is passed to the SFXHandler class which I have created to handle all sound effects in the game.[code]Can anyone see why calling SetSFXVolume would not change the volume at which the sounds were played?

View 11 Replies


Similar Posts:


ActionScript 2.0 :: Why Isn't Volume Changing

Oct 11, 2008

Why isn't my volume changing? the volume amount is correct, but the volume doesn't change to that amount.[code]

View 4 Replies

Actionscript 3.0 :: Changing Volume With SoundChannel

Jun 1, 2009

Code: Select allprivate var musicFadeAmount:Number = 0.005; // Amount to fade the music
// Helper function to change volume
private function SetVolume(vol:Number, sc:SoundChannel):void


[Code].....

I run the last two rows in an ENTER_FRAME loop, and from the trace in the SetVolume() function I can see that scMusicIdle changes it's volume like it's supposed to, but scMusic keeps it's volume. I can change the volume when I play the sound with a new SoundTransform().

how to fade between two tracks in a better way I'm all ears. If it makes any difference it's an AIR 1.5 app.

View 1 Replies

ActionScript 3.0 :: Looping Sound And Changing Volume

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

ActionScript 3.0 :: Changing Volume Of Sound In Channel?

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

ActionScript 3.0 :: Simple Volume Slider That Controls The Master Volume Of The Entire Swf?

Oct 6, 2009

does anyone have an example of a simple volume slider that controls the master volume of the entire swf?

View 1 Replies

Flash :: Volume Slider - Volume Doesn't Change Until Mouse Over?

Nov 21, 2009

I've created a small music player with a sliding volume control. I'm having trouble with the volume. Though it does control volume properly, if I set the initial volume to less than 100%, the volume always starts at 100% until I move my mouse over the player. At that point, the volume changes to whatever the initial volume is set to.Is this a flash bug, or am I missing something? Here is the affected code (code for other buttons/functions omitted for brevity):

var song_initvolume:Number = 100;
slider_1._x = groove_1._x + song_initvolume;
playSong(0,song_play);[code]....

I'd like to be able to set the volume at say 50%, but the above mentioned behavior happens each time.

View 2 Replies

Flash :: Reverse Sound Volume Math For Volume Slider?

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

Actionscript 3 :: Volume Controls - Volume On Or Off Through The Games?

Apr 12, 2012

I've got a serious of games which in turn load off a main main swf.I have mute and unmute buttons on the main menu and the same buttons in each game.When I unload/load a game I want the volume to stay as it is so they player doesn't have to keep turning the volume off. AudioOff is the button shown when the volume is off and AudioOn is the button shown when the volume is on.The code I've got now keeps the volume on or off through the games but the buttons aren't showing up correct with this code..

if (SoundVolume.volume == 1)
{
AudioOn.visible = false;[code].....

View 2 Replies

ActionScript 2.0 :: Volume Slides But No Volume Change?

Sep 10, 2011

I converted the slider bar and slider button to buttons. Then, I made the slider button into a movie clip.

Here is the code I placed while slider button was a button:

Code:
on (press) {
startDrag(this, false, left, top, right, bottom);
}

[Code]....

It seems right to me but I don't know. The movie button slides down the slider bar but it just doesn't affect the volume. Going to try to attach my FLA to offer better insight. Just tried to upload it and no matter if it's FLA or zipped FLA, it says it failed.

View 1 Replies

Flex :: Changing Cornerradius Of Label And Changing Arrow Of Combo Box

Aug 14, 2009

How do I change the corner radius of a Label component in Flex. Tried applying style name, and the setStyle('cornerRadius',9) methods, but doesn't work. How can I change the arrow image in the combo box control to a different image?

View 4 Replies

Duplicating & Changing Movie Clip Without Changing Original?

Aug 31, 2009

I want to create another button on the main menu of my flash site. I want to take one of the existing buttons (which are set as movie clips) and modify it to show a different menu name and page link. BUT when I go into my library and "duplicate" my movie clip, change the instance name, drag it to the stage and attempt to modify it, the original changes as well. I need to keep the original the same and create a new one with the same code, frames, etc but with different static text. I keep going in circles

View 1 Replies

ActionScript 2.0 :: RGB Changing Is Working But Not Changing All The Time

Feb 1, 2006

basically when you load the .swf it changed everytime u re-load it , i want it to keep on changing even when the user hasnt reloaded the image

[Code]...

View 1 Replies

ActionScript 3.0 :: Set The Volume To Something Like 5/10?

Jul 31, 2009

i have a Audio button that I have set up and it is all working finebut I would like to set the volume to something like 5/10.and I thought I had is set up right but it does not seem to work.can anyone see what I am doing wrong(note - I get no errors but also no sound control)I should also mention that I don't need the user to control it other than just
on and off.

Code:
var loadSnd:URLRequest = new URLRequest("ax Mr .l..mp3");
var thisSnd:Sound = new Sound();

[code]......

View 0 Replies

ActionScript 3.0 :: Possible To Cap Volume?

Oct 24, 2009

I have a tower defense game that I am working on and I'm in the process of adding sounds. Each tower plays its own fire sound when it fires. However When I have 5+ towers of the same type firing at the same time the volume gets louder.

Here is my game as is, the sounds are only in testing stage right now and I am aware that they can get annoying with the current set up.[URL]..

Most noticeably are the air towers. if you feel like listening play my game and first place 1 Air (blue) tower on screen. When the first air wave starts (lvl 4) hear the one tower firing alone and then during this stage add a 2nd tower and the volume almost, if not, doubles.

View 2 Replies

ActionScript 2.0 :: Getting More Than One Volume Control?

Jan 13, 2009

using action script2 flash cs3, and i need more than one volume slider/control and each control needs to be assigned to one sound, atm i have more than one volume slider but they all control the same sound!

View 1 Replies

ActionScript 2.0 :: CS3 Set Volume Slider To 50%?

May 11, 2009

I'm a designer that inherited a project with a volume slider. I'm not that good with actionscript yet and haven't been able to figure out the code. The volume and slider starts at 100%, and I need it to start at 50%. Can you tell me how to set both the volume and slider at 50%? I'm sure it is a simple solution but I can't figure it out. I tried a few things but have not been able to get it to work correctly in both the volume level and start position for the sliderHere's the code on the 2nd frame of the mc:

Code:
stop();
var NiVol:Sound = new Sound(_root.Container);

[code].....

View 4 Replies

ActionScript 3.0 :: Pan/Volume Based On X,Y?

Sep 16, 2009

Trying to get the children of lighterBoard to pan to different channels based on their Y coordinate.(children on the left side of the screen play left channel, children in the middle play both, right side, right channel etc.)

volume works on X for the lighterBoard.

Having trouble with Pan and getting it to look at the children.

}
function playVol01() {
trace("Swoosh Sounded");
Vol01Channel=Vol01Sound.play();

[Code].....

View 1 Replies

Use EBS Volume From Stock FMS Image On EC2?

Jul 21, 2011

I'd like some changes to the config to be persisient though.

I've created an AMI (built using the stock CenOS 5.5 and FMS 4.02 AMI's Kernel ID and RAM disk ID) but when I launch it says the "AMI and kernel are incompatible" or similar.

View 6 Replies

ActionScript 2.0 :: Two Buttons To Set Volume

Jan 14, 2009

My site is nearly ready, but I still want to add two buttons: one to set the volume to a normal value; another one to set the volume to 0 (like a mute button). I don't have a background music, I just want these two buttons to make effect on several other buttons with "click" sounds attached.

I have my buttons ready, and tried using this code for the "no sound" button:

ActionScript Code:
on (release) {
set.volume(0);
}

[Code].....

View 3 Replies

ActionScript 3.0 :: ComputeSpectrum If Volume Is 0?

Jul 31, 2009

I'm building a media player with a sound visualizer using computeSpectrum(). When I adjust the volume, there is no longer any data for the visualizer. Does anyone know a way to adjust the volume of audio, but still access audio data using computeSpectrum() as if the sound were still audible?

View 3 Replies

ActionScript 2.0 :: Keep All Sounds At The Same Volume?

Aug 30, 2011

On a movieclip I have a sound that plays whenever the movieclip is dragged over the right object. It works but the problem is that it lowers the volume of the background music (which I don't want). I think that if it were possible to change the type of sound using ActionScript to an Event sound it would work.Here is the code:

ActionScript Code:
unlocking = new Sound(this);
unlocking.attachSound("unlock");
unlocking.start();

View 5 Replies

ActionScript 2.0 :: FMX: Boosting Volume Above 100

Feb 20, 2003

I know how to make a slider that controls the volume from 100 to 0. But is there a way to boost the volume in Flash?

I want the movie to open with the volume slider at 50% (visually) but the volume level (audibly) to be 100%. Then lowering the slider to 0% will cut the audible volume to 0 but raising the slider to 100% will boost the volume audible to 200%.

View 6 Replies

ActionScript 2.0 :: Why Can't I Do Volume Sliders

Dec 15, 2004

I've been trying to create a volume slider for about two hours now and it just doesn't work. I followed Ilyas' slider tute and Kirupa's volume control tute both to the letter and now no sound loads, the slider doesn't control anything and it sticks to the mouse when you let go i.e. it still drags left and right across the slider after you release the mouse button.I can't show you my code unfortunately as I just got really angry and wiped it.Could someone please either show me exactly how to load a sound and control it's volume in one tute (Kirupa uses a different method from the "load sounds using AS" tute to load his sound in the volume tute but he doesn't explain it. I don't want his source .fla+mp3.) or make me a .fla that loads a sound called "music" (linkage name) and controls it's volume.

View 3 Replies

ActionScript 2.0 :: Reduce The Volume?

Mar 2, 2006

My problem is... I import two sound files and give the linkage name snd1 and snd2. In the first key frame I add this

sound1 = new Sound();
sound2 = new Sound();
sound1.attachSound("snd1");

[code]....

View 3 Replies

ActionScript 2.0 :: Set Global Volume To Zero?

Mar 16, 2006

i have a button, and i need to to see the volume to zero when this button is pressed, and when this button is pressed again, the volume goes back to 100

i have different pieces of audio all around my flash presentation so i just need a global volume that sets my volume to 0 and also to a 100 when pressing the button.

[URL]

View 5 Replies

IDE :: Volume Slider Using Mask?

Mar 30, 2009

I made a volume slider which works with a draggable mc to control the volume. But I want to do a bit different slider using a mask like the slider in Component box. The aria I want to drag over is a rounded rectangle. I make a rectangle which will be my bound and i use the rounded rectangle to mask it. How should i continue.

View 1 Replies

IDE :: Raise The Volume To 200% In Flash?

Sep 28, 2009

I have an mp3 that when it loads it doesn't sound loud enough. I tried raising it with the following code, but it didn't work. I can raise the volume to 200% in VLC. How can I raise the volume to 200% in flash???

Code:
import flash.utils.*;
var audioURL:URLRequest = new URLRequest("Irving.mp3");
var exsound:Sound = new Sound(audioURL);

[Code].....

View 6 Replies

ActionScript 2.0 :: Start Volume Above 0?

Jun 11, 2010

I have the following code, which I got directly from the volume bar tutorial, then changed to auto play. However it only plays for a split second because the volume bar starts at 0. I want it to start maybe at like 15 or 25...not too loud, just so the viewer hears the music without having to move the volume bar over.[code]....

View 1 Replies

F8 :: Timeline Sound Volume Control

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







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