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
Similar Posts:
Mar 7, 2012
I want to make a variable sound level. I want to be able to lower the sound with one button and make it louder with another button.
the buttons are name btnplus and btnmin. I thought using the current sound level and the change it, but the code i am using doesn't work.[code]....
View 4 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
Oct 8, 2010
I have an external video list (array) that is set up to load and play in an FLVPlayback component. The client wants individual audio control buttons: 1) Up volume 2) mute 3) Down volume. I have AS on each of the buttons but it's not controlling the volume of any of the videos. The only one that works is the mute or "stop all sounds." I'm unsure on how to go about getting what I want.
View 5 Replies
Oct 8, 2010
I have an external video list (array) that is set up to load and play in an FLVPlayback component. The client wants individual audio control buttons: 1) Up volume 2) mute 3) Down volume. I have AS on each of the buttons but it's not controlling the volume of any of the videos. The only one that works is the mute or "stop all sounds." I'm unsure on how to go about getting what I want.
View 9 Replies
Dec 17, 2010
I have a file with 12 roll over buttons that make a sound on roll over, but I'm unable to change the volume to lets say .5.
View 0 Replies
Aug 19, 2011
For buttons like the MENU or BACK button you can just add a listener for KeyboardEvent and check if the event keyCode is Keyboard.BACK or Keyboard.MENU.However I don't see anything for knowing if the phone's volume buttons were pressed.Is there a way to listen for volume up and volume down keyUp/keyDown events in AIR (ActionScript 3)?
View 1 Replies
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oct 29, 2009
I got a code for a flash player but it only has a start and stop button . I would like to know how to add a volume control and a pause button.
Here is the code;
var nc:NetConnection = null;
var nsPlay:NetStream = null;
var metaDataValues:Array = new Array();
[Code].....
View 2 Replies