ActionScript 2.0 :: Muting Some Sound And Unmuting It With Same Button

Oct 18, 2007

How are you all going?? I'm having a bit of trouble with muting some sound and unmuting it with the same button.[code]What i'm trying to do is mute the sound when the button is clicked...and then when it's clicked unmute the sound..I was thinking about using an if statement to check if the volume was set to 0 and if so change it to 100 and visa versa.i'm muting the sounds on the root level of my swf...

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Mute/unmuting Internal Sound?

Mar 10, 2009

I need to mute/unmute the volume of an streaming internal

View 1 Replies

Actionscript 3 :: SoundTransform Is Muting The Sound But Sound Still Plays

Apr 6, 2010

I am using the following code, in the last line when I play the sound I can still hear it even when I have transformed it to 0.

[Code]...

View 1 Replies

ActionScript 3.0 :: Muting Sound In A Loaded Swf From The Main Swf

Aug 25, 2009

I have a swf I am loading in and I need to be able to mute the sound of those soundChannels in the keyframes inside of the other swf. I have a mute button that I am toggling its visiblity on and off, one for mute one for sound. I need to be able to access the sound clip inside the external swf.

View 3 Replies

ActionScript 3.0 :: Muting Individual Streaming Sounds Vs Global Sound

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

ActionScript 3.0 :: Muting Audio Inside A Timeline With A Button AS3

Oct 12, 2009

I have a narrated fla which needs to have an audio mute button so you can mute the audio, problem is I can only find how to do with streaming audio. I need this done off a button where the audio is on a layer inside the timeline.

View 10 Replies

Professional :: Muting Audio For A MC On A Specific Keyframe?

Jul 12, 2011

I have a file with a main movie clip called "clip" and inside that I have a couple separate movie clips. One of them has embedded audio and is called "trackPiano". I want to put an action on a keyframe so that when that keyframe is reached, the audio mutes. I think I should be able to use the soundTransform property, but I'm not sure how to go about implementing it.
 
Also, I'd like to then un-mute the audio for that mc when I go to another specific keyframe.

View 8 Replies

Professional :: Muting Audio On Multiple Embedded MCs?

Jul 19, 2011

I have a file with one main mc called "clip" that contains 9 different embedded audio tracks (all inside their own separate mc) on the first keyframe. They span the entire length of the mc - 10 frames in this case. Essentially what this does is creates a full song with 9 separate tracks that I want to mute (and unmute) when I arrive at a specific keyframe.I am using a slider (called "aSlider") on the main timeline to navigate between the keyframes.Everything starts out muted and as we progress, tracks are unmuted and the song starts to build. It is working great right now in that direction. However, if I move the slider backwards, it seems to be re-creating the audio clips so that I am overlaying more and more audio on top of each other.. which is quite the mess. Here's the AS for the slider.

aSlider.width = 324;
aSlider.move(309, 681);
addChild(aSlider);

[code].....

View 1 Replies

ActionScript 3.0 :: Muting Or Stopping Time Line Sounds Of A MovieClip?

Jul 30, 2010

I'm doing a project that has a lot of time line animation.There are 5 buttons. Each one plays a multi-frame MovieClip containing sounds embedded in its timeline.Then there is a button that stops any of the playing movie clips. Of course, this doesn't stop the soundsormally, I'd just use...ActionScript Code:SoundMixer.SoundTransform.stopAll();Problem is, I also have non-timeline sounds that I have playing on a loop for background music, and the SoundMixer would stop the music too. But I don't want the music to stop.Doing some research, I think any MovieClip can have a SoundTransform property you can adjust, so I should be able to control the sounds just inside specific MovieClips. But I can't figure it out.

View 1 Replies

Professional :: Button Over Sound Plays Again Before Button Down Sound

Apr 15, 2010

I've assigned a sound to the button over frame and a different one to the button down frame. When i over over the button the button over sound plays. When I then click the button, the button over sound plays AND the the sound I put in the button down frame plays.

View 8 Replies

ActionScript 1/2 :: Make Button On Rollover Starts Sound And Rolloff Stops Sound?

Jul 28, 2009

I have several buttons in a movie and I want to be able to rollover an individual button and play the sound for that button and when I rolloff I want the sound for that button to stop.

View 6 Replies

ActionScript 2.0 :: Add Mute Sound And Unmute Sound Script In A Single Button?

Sep 21, 2011

how to add mute sound and unmute sound script in a single button?

View 2 Replies

ActionScript 3.0 :: Stop Button Sound But Not Main Background Sound?

Aug 5, 2010

I have a bit of a problem with sound.. I have a main container animation with background sound that's loaded with soundChannel..I also have an externally loaded SWFs with Movie Clip buttons that have a sound ON ROLLOVER on the timeline..after rolling off - I place the:SoundMixer.stopAll();to stop the button from playing the sound once the mouse is rolled off.. However, the problem I'm running into is that it also stops the sound of the main container movie cli

View 1 Replies

Stop Sound From Going Into Next Scene While Keeping Button Sound?

Oct 19, 2010

I'm sure this is a common problem, I tried looking around on the forum for a problem like mine but was unable to find anything. I'm using Flash CS3, Actionscript 2.0, and am making a soundboard. I have two scenes, one that's the title screen, of which has a sound file loaded via the timeline, (I think) set to Event and Loop, and a button which takes you to the next scene and makes a short sound when it's pressed. My second scene has background music as well, also set to Event and Loop.

Problem is that when I press the button, the background music keeps playing into the next scene. I tried using putting stopAllSounds onto the button, but that makes the sound of the button stop as well, and I'd really like to keep it. I've been messing with this for days, and I can't figure it out.

View 3 Replies

ActionScript 2.0 :: Play Sound/stop Sound Button?

Feb 13, 2007

i want to make a single button to play a sound, and if pressed again, stop the sound. and if pressed again, play the sound, and so on...
i know it has to be made with a boolean variable, true/false, but i just can't figure out how.

View 13 Replies

Flash8 :: Simple Sound On / Sound Off Button

Nov 10, 2011

basically i simply want to give the option of turning of the sound in my flash via a button (If you press it sound goes mute, press it again sound unmutes) I searched around in the tutorials but i could only find (for this purpose) complicated pan sound control stuff.

View 1 Replies

Professional :: When Press On The Button The Stars Will Be Flying From The Button And The Sound Will Play?

Jan 29, 2011

i'm designing a website in flash8... now i have created some buttons, and i want that when i click on the button stars will fly from them and there will be a sound... i have already created the animation of the stars seperatly and it's in the library, i have also the sound file.... i just can't remember how to put everything together.... when i'll press on the button the stars will be flying from the button and the sound will play?

View 3 Replies

ActionScript 2.0 :: Stop Sound Loop From One Button By Clicking New Button?

May 22, 2011

I want to stop the sound loop from one button by clicking new button. Does anyone know the code that would stop one button's sound from looping by just clicking another button (for another sound)?So you have these buttons:button 1 button 2 button 3 button 4and after clicking "button 1" a sound loops. when i click "button 2" i want the sound from "button 1' to stop.

View 2 Replies

Actionscript 3 :: Sound Latency - Set It For Any Silence Before The Actual Sound By Calling The Sound

Apr 16, 2011

I am triggering short sounds dynamically from the library for a game (Specifically Air for Android). When the user clicks a button the sound can take up to 600ms to actually play. I have set it for any silence before the actual sound by calling the sound like so:

[Code]...

All return the same results. I know there are threads here that talk about this but none have offered a real solution that I can find. Is there no way to cache the sound or store it in a buffer?

View 1 Replies

CS3 : Adding Sound To A Button?

Mar 25, 2009

I am having problems with a flash template that I am redesigning. Currently when the movie loads it automatically starts a song in the background. When you click my music navigation link my music page comes up and there are a few links there that I want to add music to. I also need to stop that background music so the song from the link can play.

View 1 Replies

CS3 Sound On/Off Button In Movieclip?

Nov 17, 2009

I'm trying to make a button that when clicked executes a sound clip and plays all the way through. Also, if the button is clicked while the sound is still playing the sound needs to stop. They have me first place this code in the first frame:

my_sound = new Sound();
my_sound.attachSound("bubble_01sound");
play();

Next I create two buttons, an on and an off which are placed separately in the second and third frames respectively. Code is applied directly to the buttons.

The on button:

on (release) {
_root.my_sound.start(0,1000);
_root.gotoAndStop("stop");

[code]...

Finally, I name the 2nd frame "play" and 3rd frame "stop" and add stop(); to both frames. Oh I also set up the linkage so that the sound's identifier is "bubble_01sound".

This is all well and good however, here's the rub. Unlike their example which takes place in the main timeline, my button needs to bob up and down. So I put everything from the tutorial in a movieclip and on the main timeline animate the movieclip as I like. When this plays the button does not play sound. I took this as the initial sound code not being activated because its in the movieclip. If I take the sound code out of the movieclip and place it in the first frame of the main timeline, the button does play sound but the stop function does not work. I can keep clicking the button which repeats the sound on top of the already playing sound.

So it seems to me there are three options. One, I need to find a way for the sound code to be activated when its seated in the movieclip. Or two, with the sound code in the main timeline, I need a way for the on/off buttons to reference the code which is one level up in the main timeline. Or the third option would be that I'm completely wrong... I'd put my money on the third option.

View 3 Replies

Button Plays Sound Twice

Nov 28, 2009

In my flash game, every time you click a button, it plays a short sound. Almost all of the buttons work - Except for a few random handful. Those couple play the sound twice. I don't know why either - I double checked everything.None of the frames have sound. The buttons that play twice are only set to play once. I didn't do anything different between the ones that worked and the ones that don't work.

View 2 Replies

ActionScript 3.0 :: Using Sound For A Button?

Aug 23, 2009

I am having some problems in Flash using sounds for a button. Although I didn't use any code (I used the Button symbol), the file I created is for AS3. The problem is that I have two sounds, one for rollover and one for down state, and when I click both sounds play. I tried creating the button in AS2 and it works fine.One time, I managed to create a movie clip using a single symbol for 5 buttons and only one of them is having this problem. I don't see any logic in this.[URL]..

View 2 Replies

Play A Sound On Button Press?

Aug 11, 2009

OK, say I have a button that does something, like go to the next frame, is there anyway to have it play a simple sound located in the library without looping?

View 8 Replies

Stop Sound When Next Button Clicked?

Apr 2, 2010

I'm making a page with multiple soundclips - each one launched by a separate Flash button.

Problem: If someone clicks a button and then clicks another button without first stopping or pausing the original soundclip, the two play at the same time. Press another and three clips play at once.

How do I make it so that when you push the next button it stops the first clip and then plays the second one?

View 5 Replies

ActionScript 2.0 :: Pause Button For Many Sound?

May 21, 2010

i am having a problem in creating a plause, play button.The problem now is the button just can pause 1 sound.i have many sound at timeline and it will play 1 by 1.

This is wat i have do at the 1rst but it cant pause all the sound. i try to remove mySound.attachSound("tomato");but it wont work also. the another problem is if i click the play button for 2 times, it will got 2 sound play together.

mySound = new Sound();
mySound.attachSound("sound1");
mySound.start(0,99);

[code]....

View 14 Replies

ActionScript 3.0 :: Stopping Sound Without A Button?

Apr 4, 2010

Is it possible to stop a sound playing without a button? I have background music on frame 1 but before I move onto frame 2 I want the sound to stop. I have 5 buttons on frame 1 to lead to different frames but I do not want them to control the sound. I also do not want to use stop all sounds on the next frame as I want sounds to work on those pages. The script below is to start the sound so how do I stop it from continuing onto the next frames when the control buttons are clicked.

View 6 Replies

ActionScript 3.0 :: Stop Sound Of A Button?

Aug 5, 2010

I have a bit of a problem with sound.. I have a main container animation with background sound that's loaded with soundChannel..I also have an externally loaded SWFs with Movie Clip buttons that have a sound ON ROLLOVER on the timeline..after rolling off - I place the:SoundMixer.stopAll(); to stop the button from playing the sound once the mouse is rolled off.. However, the problem I'm running into is that it also stops the sound of the main container movie clip

View 9 Replies

Button With MP3 File Attached - Sound Cut Off At End

Nov 10, 2007

I have a button with a sound attached to it. The button should play the sound when the mouse is in its down state. When I play the sound in the .swf file the sound plays but it's cut off at the end (maybe the last 3 seconds). I'm using mp3 files for the sound. This is happening with many of the buttons in the program. It's a simple operation within the program. The user clicks a button and voice-over is supposed to play.

View 0 Replies

ActionScript 2.0 :: Blending On/off Sound Button Together?

Apr 17, 2011

ActionScript Code:
on (release) {
tellTarget ("../music") {
stopAllSounds();
}
}
on (release) {

[Code]...

How do you make that into one script so the on button is the same as the off?

View 9 Replies







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