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


Similar Posts:


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

Professional :: Adding Volume Controls?

May 16, 2011

I've inserted an audio file into my flash movie and I wondered if there was an easy way to add some volume control and/or an on/off audio button to the movie? Or would this have to be scripted using actionscript?

View 2 Replies

Professional :: Why Don't The Mp3 Volume Controls Work In Loaded Mc

Oct 15, 2010

I have an issue with an Mp3 player that I've built. The volume controls work fine in the original mp3 swf, but then when I load it into a movieclip in a different movieclip, it no longer works. I've tried the lockroot function, defining the sound class to "this". See the last function for the vol controls. Let me know if it's more convenient to get the original .flas, I can give a link to the source.
 
see my code below:
 
this._lockroot = true;
function getSound(url:String) {sound.stop();delete sound;sound = new Sound(this);sound.onLoad = function(success:Boolean) {

[Code]....

View 3 Replies

ActionScript 3.0 :: Different Examples Of Volume Controls For Videos?

Feb 14, 2012

I had seen different examples of volume controls for videos. I had built one that works, but the volume control is outside the main controller/Holder, so If I move the Holder the volume stays. I tried placing the volume controller inside the holder, but I loose the ability to drag and control the volume. here is the AS3 code I have.
 
Holder_mc is the main mc that will contain all other controllers.

[Code]...

View 3 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 2.0 :: Mp3 Volume Controls Not Working In Loaded Movieclip?

Oct 15, 2010

I've created an Mp3 player with dynamic sound controls. Everything works fine when tested in the swf, but when I load the mp3.swf into a separate movieclip in another swf, the volume control does not work.

I've tried setting the lockroot to true and it still does not work.

Here's the code:

slider_mc.onMouseMove = function() {
myPoint = new Object();
myPoint.x = this._x;
myPoint.y = this._y;

[Code].....

View 9 Replies

ActionScript 3.0 :: Add A Mute Button To Container Swf That Controls Volume?

Nov 12, 2007

I have a swf that loads external swfs. I am trying to add a mute button to the container swf that controls the volume, so the user can mute and unmute the sound. However, I cannot figure out how to accomplish this. I cant get setVolume from AS2 to do the job. I have also tried SoundTransform.volume=0 and that didnt work.

View 13 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

ActionScript 3.0 :: Add A Sound File To Project With Controls To Stop And Play And Volume Slider

Dec 6, 2009

I'm new to Actionscripting and I want to add a sound file to my project with controls to stop and play and a volume slider. I'm using this actionscript for the controls. It works but right now you need to click the play button for it to start. Is there a different way to write it so that the music starts playing when the scene starts, and then the user can stop or play it again and change the volume?[code]

View 3 Replies

C# :: Create A Slider On Desktop To Access Some Of The Controls Of The YouTube Video Player Like Volume - Pause - Play - Playback Speed?

May 7, 2010

Is there any way I can create a slider on my desktop to access some of the controls of the YouTube Video player like volume, pause, play, playback speed? I know it is a flash player, but would this involve accessing the YouTube API or something else? For example, I'd like to program something similar to what's provided by the Enounce MySpeed application (control over play back speed).

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 :: 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 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