Simple Mute Button
Yea...a code like
on(release) { sound._mute = true }
that for mute button, code please?
Oh, instance mute_b
But you wont need that
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 03-31-2007, 06:13 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Simple Mute Button
Could someone please help since my head is about to implode!
I just want to make a mute button work.
Have an flv running, playing once at page load.
A sound is attached to that flv.
I have dragged a standard mute button from the components panel onto a keyframe. Now I need the AS for this, have of course searched the forums archives but don't seem to get a clear cut solution, so if anyone could help I'll appriciate.
Thanks.
Simple MUTE Button
Hi people,
I need to create a simple Mute button for this flash anim ive made for a University assignment.
http://www.lemonfridge.com/uni/digitalmediapromo.swf (its 4.1mb, so i recomend you Right-Click and Save Target. No pre-loader.)
Im new to flash, so i wanna keep things simple.
I looked at the setVolume stuff, but couldnt get it to work. The sound is loaded on the first frame of the 2nd scene. I just imported it and dragged it to the stage.
Ive tried having a button doing this, but it has no effect.
Code:
on (release) {
Sound.setVolume(0);
}
Anyone?
I cant use a stopAllSounds, as its all synced an in-time with the anim. I also want a button to unmute the sound, but that shouldnt be too difficult once ive gotten the Mute working.
Help Me Make A Simple Mute Button
OK, so I'm no newbie but I do suck at Actionscript. I'm sure this is really easy to do....
I have a simple animation synced to a soundtrack on the main timeline, all I want is to have a button that sets the volume of all sounds to 0 when clicked, then when clicked again it will return the volume to 100. So what code should I put on my button?
Note: I don't want to stop the music, just mute it.
I'm using MX2004 if that makes a difference.
I would really appreciate any help you can offer, thanks in advance.
Simple Mute Question - I Am Confused
Firstly I am still very new to flash and I have searched the forum, but can not find any solutions that work for me.
I have a movie clip with a sound in it, that plays once, each time the movie loops the sound is played again.
I want to put a button on the movie, that the user can click to stop the sound the next time and the next, etc the movie loops around.
I have read about:
on (release) {
stopAllSounds();
}
But that doesn't work.
Could someone please point me in the right direction.
Mute All Sounds Button / Resume Playing Sound Button
Hi there gang!
ok i dont know how exactly to do this..so i need some help, a fla file for this kinda thing would be super if you happen to have the solution.
Ive done about a 5 mins flash presentation with audio speak for that duration, the speak itself is cut up into about 36 seperate wav files on the timeline. ANyhow i would like a MUTE button that when click would mute the sound...BUT!
Important thing is that if the viewer decides to click it again at anytime and wants to hear the speak, it should resume from where you are currently going on the timeline..this is streaming speak which is in sync with animations.
I could use a Stop all sounds commmand but then thats not quite enough..would like to also have the option to resume speak and in sync from where you are currently..
The file is here and is almost done..exe file link:
http://www.beats.midnightsunrecordin..._LtY/LtY20.exe
Im in quite a hurry with this so if anyone has any comment please please..im crap with action script so an FLA for normal MX would be helpful..
many thanks!
cc
Mute Button Not Working For Button Rollover Sounds
I got my code for a mute button from the flashkit FAQ on sound,
and it seems to be muting everything but my rollovers. Anyone have any ideas?
it mutes the sound in all levels except for the buttons in _level0
and the button itself is in _level0 ?
code: // on main timeline
globalvolume = new Sound(); // no associated movie clip.
//button to mute sound and change toggle mc frames
on(release){
if(_root.globalvolume.getVolume() > 0){
_root.globalvolume.setVolume(0); // mutes all sound
play(); //switch to mute frame
} else {
_root.globalvolume.setVolume(100); // unmutes all sound
play(); //switch to unmute frame
}
}
thanks in advance for any input
Mute Volume Button & Start/Pause Button
Hi!
OK..I used to be "OK" at AS1 and AS2...but I haven't done Flash in 2 years. Now I've plunged myself into CS3 and AS3 and feel like I know NOTHING! And I suppose I do...I don't understand "Classes" and a lot of things.
Can someone direct me to a tutorial that teaches me how to:
1) Create a button that toggle mutes/unmutes an embedded audio (voice over) file that streams throughout the entire movie? (I need to be sure that the file syncs exactly to the animation, that's why it's embedded).
2) Create a button that simply toggles start/pause for the main movie timeline.
Thank you for ANY help you can give.
--Darcie
Mute Button Or Sound Stop Button.
I would like to make a mute button to make the sound stop in a movie.. I'm a newbie and can not find any code or script for this. anyone have and answer or script they would like to share for this button...
Thank You!!
Mute Button, Need Some Help
I am trying to impliment a mute button that when clicked "stops all sounds" and then when clicked again will start playing sound (and it needs to be the current sound acompanying the presentation).
Right now I have:
on (release) {
stopAllSounds ();
}
on (press) {
if (stopAllSounds) {
;
}
I found the volume start action but I don't know how to properly impliment it. If someone could please lay out the steps for this I would greatly appreciate it.
Thanks Again,
TTM
Mute Button
Hi all
Does anyone know a good tutorial on creating mute buttons - when clicked audio will stop and play???
Thanks
J
Mute Button
i have a site that actually plays a song and i'd like to create a simple MUTE button to give the visitor the option to mute the music as well as turn it back on... HELP!?
Mute Button
How do make the stopAllSounds command work globally. I want one button that stops every sound, in every movie clip(even button sounds), until clicked again. Any help is appreciated.
Mute Button
How can I make one button that will stopAllSounds in every MC, in every timeline. Basically I need a global stopAllSounds command.
Thanks for your time.
Mute Button
ive got a video playing on my site continously. the sound is integrated into the movie. is it possable to mute any sound coming from flash so the user doesnt have to hear it.
Mute Button
I have music playing during my flash video, and I know some people don't really like music while they are reading or whatever so can anyone help me make a mute button for my project. What I want to do is have like the text "Mute" or something like that and then, when they click on the mute button it gets X-ed out and the X disappears when it is clicked again and the music comes back on. I know how to make the sound stop by using the actionscript, but the X doesn't stay over the word "Mute", and I don't know how to make the sound come back on if it is clicked again. Can anyone help me and walk me through the process on how to do such a thing? Your help would be greatly appreciated.
Mute Button
I have looked through the tutorials here and elsewhere, and have found some very uesful tips for FUTURE projects, but for one I'm working on now, I need a simple mute button. I don't want to pause the music or turn it down in increments, I need a code to mute it, then if desired, un-mute it, via a button. Can anyone help me?
Mute Button ?
Hi I want to add mute button to my movie using dot notation code. Using one button it should mute / unmute the sound. Thanx.
Mute Button
i made a mute button then put it in a movie clip. and gave it this code:
PHP Code:
if mutes == 0) {
on (press) {
mutes = 1
}else{
on (press} {
mutes = 0
}
}
but it didnt work.
Mute Button
hi, i've a flash video clip with sound.
i need a mute button that mute's the sound, even if the clip is stopped and played again.
ie, the sound will only play when the mute button is unclicked.
ta.
Mute Button
Hello,
I have created a mute button that you click on to mute the music in my movie and then click on it again to un-mute (is that a word?)
Anyway, I want an "x" to appear over the mute button when the music is muted - and then I want the "x" to dissappear when I un-mute it. How do I do this? I should know how but I think I'm running into a bit of brain freeze.
Thanks.
Mute Button
I want to mute all sounds with a button ... then turn all sounds back on with the same button.
How ya do dat?
Mute Button
I would like to create a mute button that will aloow the user to mute or unmute the sound by clicking on the button. Does anyone have the script to accomplish this?
Thank You.
Hedley Turk
www.ChasingErections.com
Mute Button Help
Well I've been trying to make a sound on/off button for ages but I just can't seem to get it to work. I tried using the stopallsounds action but it only stops the current sound playing and since I have quite a few sound effects in my piece they continue to play. I also saw someone wrote that if you change the type of sound from 'event' to 'stream' they'll all stop, I tried this but the audio quality is terrible. I've also tried my luck at a mute button where the whole animations volume is switched to zero but I am not sure how to do this properly.
Also the stop action is not working for my stop button either. If anyone could help it would be much appreciated. If it is easier I'll upload the file so you can see what I'm trying to do and help me out.
Thanks
Steve
Mute Button
hi i am trying to make a simple mute button which will turn various sound clips on/off throughout a presentation (only one clip is playing at any time). I can only find tutorials which restart the sound clip and not just mute the sound though. im sure its a pretty simple thing to do i just dont know how, mayb volume control?
any help would be gratefully received
Mute Button
Hi!
Ok here's my problem: I have a flash movie I made that has background music. The music is not in the timeline, it is an external mp3 file. I did it that way because the music was bloating the file too much. So now I need to have a mute/unmute button to mute the music if someone doesn't want to hear it. I need it to be unmuted by default. Also, the beginning of the song is kinda synced up with the beginning of the animation, so I need it to either keep playing in the background or start from where it was stopped, something like that. In other words, I can't have the music start over when you unmute it after muting it.
I read tutorial after tutorial online, and tried them all, but none of them dealt with music that was loaded from an external source.
You can see the movie at http://www.ieculture.com
and you can download the .fla file here: http://ieculture.com/ieculture_intro.fla
(it was made in flash cs3, but I saved it as flash 8 incase someone wanted to look at it but didnt have cs3)
Any more info you guys need, please let me know, and thanks in advance. Oh by the way, this is my first flash project so I'm a beginner, please use SMALL words haha. Thanks
[CS3] Mute Button
I have a movie with multiple scenes, each with its own voiceover (separate audio files in each scene). Is there a way to code a mute button that will work across all scenes? Thanks.
[CS3] Mute Button
Ok, easier question. My sound is placed on the timeline and set to stream. Is there an easy way to mute the volume globally via a mute button? I need the sound to remain on the timeline in order to syncronize with the animation's play/stop controls. So, is there a simple function to set the volume to "0" when the mute button is clicked? It doesn't seem like it should be hard to do, but in actionscript 3 it seems to be a major hassle.
[F8] Mute Button Help
hi friends,
i have done a cartoon animation. it has two scenes which runs continously(starts from scene1 and ends at scene2). i have given audio in both the scenes. the problem is if i click the mute button when scene1 runs, it stops the music. but automatically the music starts when the scene2 comes. (since both the scenes are continous)
i want a mute button which should pause the music for both scene 1 and scene.
pls help me in this regard.
Mute Button
I need a button that will mute a sound file. The sound will need to be playing all the time, so when I click the button a second time, you will hear the sound at a different point in the wav file.
I currently have it set up so that it will "stopallSounds", but when the button is clicked to resume the sound, it just starts the wav file again from the start.
Any help would be appreciated.
Mute Button
i just want to make a simple button that when clicked will mute the mp3 file that automatically plays when my site opens and then when clicked again will resume playing of the mp3 file....can anyone help??
Mute Button
How do you make "one" buttong both mute and resume the playback of your background music. I can make it start or stop the music with the "sync" dropdown but I dont seem to be able to make it do both.
Mute Button
Hello, I need help making a mute button. I've been searching around for examples but there are none to be found.
I need a button that doesn't 'stop all sound' but something to set the volume to 0 and then back up to 100. I've tried playing around w/ the setVolume script but I don't really know what I'm doing.
Ideally the button would use script to get the volume of ALL SOUND in the movie and if the volume is greater than 1 turn it should set it to 0 and if it's less than 1 set the volume to 100. It should not stop all sound. ex. when you turn sound back on, it should start off where it left off (not from the beginning of the clip).
I dont need any fancy sliders. It will be one simple button that you press it once, it mutes the volume and again will turn the volume up. Just like the mute button on a tv remote.
Thanks in advance, GA
[F8] Setting An FLV Mute By Default,, Using The Mute Component.
Here is the scenario. I’ve got an FLV object, that I’ve associated a mute component with. I didn’t want a complete set of skin controls, only the mute button. So everything is great so far. The video streams, and I’ve associated the Mute component with the FLV,, and it works. BUT,, I desire to default the movie and the button to MUTE. So video starts to stream, and no sound until un-muted,, but the hell if I can figure out how to set the movie to mute and associate the button with it. I can set the volume to 0, on the FLV,, but that really isn’t utilizing the Mute component, and then the Mute component does nothing after that. I know it’s a simple attribute that I don’t know about,, so thanks in advance.
How Do I Make A Mute Button?
in my page, i have a sound effect onmouse over for the buttons, and i also want to have music. How would i make a button that mutes the music, but not the button mouse over sound effect? Thanks
Mute Button Question...
I have an MX movie that needs to have a button allowing users to mute all sound. Since this option is to appear before any sounds have even occured, how can I surpress them?
Thanks!
How To Create A Mute Button?
How do I go about creating a mute button that will stop all sounds from being played in a movie including on consecutive loops?
How Can I Make A Mute Button?
I'd like to make a mute button for my movie that mutes the streaming audio when the user pushes it.
However, I'd like the audio to continue streaming and have the user be able to listen to the audio again by pushing the button again.
Also, I'd like the button to have to states, one state when the mute is off (pic of a speaker) and one state when the mute is on (speaker w/ red 'X' through it).
Can someone please point me in the right direction as far as implementing a button of this sort?
Mute Button Script
Flash MX
Script needed to mute a sound object. I want the sound to keep playing, but not be audible.
Mute & Unmute In Same Button
I saw someone else asked a similar question but I couldn't understand the response, so here goes!
I've made a mute button for my project and I want the button to mute when you push it the first time, and then un-mute when you push it again.
This is what my action script looks like:
on (release) {
stopAllSounds();
}
it works fine to shut all the sound off - but how do I tell it to turn the sound back on? just in case somebody wants to hear my gawdawful copywrite-free casio keyboard music?
thanks
Beth
Mute Button Trouble
Awright... I need some help here!
I have read all the threads regarding inserting a mute button - - and seeing how I'm such a noob that I don't wanna mess with loading my mp3 as a mc (mp3 imported directly to layer), I just want a button to use the stopAllSounds command. Problem is I'm not even very good at making buttons
When I go to my button instance timeline, MX tell me "Current selection cannot have actions applied to it" in all frames (up/down/over), hence I'm at a loss for applying the stopAllSounds command.
I'm sure the solution is very simple... but I'm getting aggrevated - - wil anyone help before I toss Flash aside.
Thanx all!
MUTE Button FRUSTRATION
I've set up a looping sound with a sliding volume control - now I've added a two state button to use as a mute button - BUT I just can't get it do do what I want (mute he sound started in the root frame). The onEnterFrame instruction I've got in the sound layer seems to mess with my button too.
Any ideas? Greatly appreciated.
A zip of my FLA is at:
www.magicdot.co.uk/windybanner.zip
Mute Button Not Working, But Why?
hi - a site i'm working on just went live.
http://digthemovie.com
it has a little mp3 radio attached to it, with the requisite mute button. while it works always on the first song and most of the time on subsequent songs, sometimes after the first song, it will let songs play.
the mute button controls a _global.volume variable that is supposed to control what volume a song plays at when it begins but for some reason doesn't always. any help would be greatly appreciated. the code follows.
this is on the mute buttons:
Code:
stop();
muteon._visible = false;
_global.digVolume = 100;
radioout_btn.onRelease = function() {
gotoAndPlay("radioout");
}
muteoff.onRelease = function() {
muteoff._visible = false;
muteon._visible = true;
_global.digVolume = "0";
radio.soundtrack.setVolume(_global.digVolume);
};
muteon.onRelease = function() {
if (_root.trailerpage.restoreradio_btn._visible =
true) {
_root.trailerpage.restoreradio_btn._visible = false;
}
muteon._visible = false;
muteoff._visible = true;
_global.digVolume = "100";
radio.soundtrack.setVolume(_global.digVolume);
};
and this is the relevant code on the main radio:
Code:
function playsong() {
if (stupidMP3Pause) {
clearInterval(stupidMP3Pause);
delete stupidMP3Pause;
}
var songtoplay = songs[currentsong];
var songurl =
"webbyplace/"+songtoplay;
titlename_mc.title1_mc.title_txt.text =
titles[currentsong];
titlename_mc.bandname_mc.bandname_txt.text =
bandnames[currentsong];
soundtrack = new Sound(this);
soundtrack.loadSound(songurl, true);
soundtrack.setVolume(_global.digVolume);
soundtrack.onSoundComplete = function() {
soundtrack.stop();
currentsong++;
if (currentsong == songs.length) {
currentsong = 0;
}
stupidMP3Pause = setInterval(playsong, 1000);
};
}
stupidMP3Pause = setInterval(playsong, 1000);
if (soundtrack == undefined) {
playsong;
}
p.s. I want to give props to Anticrombie at www.flashmxfiles.com for the stupidMP3pause code, which keeps songs continuing after one has finished streaming...
Mute/unmute Button
I have an audio mute button on my site that stops the audio like so
First frame...
my_mainsound = new Sound(this);
my_mainsound.setVolume(100);
On a button...
on (release) {
my_mainsound.setVolume(0);
}
does anybody have a way of restarting the audio again without actually including a second button for 'audio on' i.e. can you create button that both mutes and unmutes?
Thanks
Mark
Mute Button Problem
I've been working on this for hours...
I put background music on my main movie with this script on the first frame after the preloader:
sound1 = new Sound(this);
sound1.attachSound("music1");
sound1.start(0,999);
That works fine. Now I want to control the sound using an external SWF that loads into an empty movie clip on the main stage called loader2. I want it to act as a mute button. I have this script on the first frame of the SWF:
on (release) {
if (_root.sound1.getVolume()>=100) {
_root.sound1.setVolume(0);
} else if (_root.sound1.getVolume()<=0) {
_root.sound1.setVolume(100);
}
}
on (release) {
gotoAndPlay(2);
}
Am I even close?
Mute Button Sounds
I have a site with no music, just button roll overs some loading on muli different levels, what is going to be the best way to just mute all button sounds. Any help would be really helpfull. Thanks.
Mute Button When Streaming
Hey All:
We have a flash intro that requires the music to be set to streaming in order to match the frames from beginning to end - using action script we were unable to get any consistency, needing the music to end on the last slide. In predevelopment we had a mute button that we would like to keep. Is that possible if you stream the audio? It's my understanding that when streaming the flash portion was controlled by the music. If you can't use the mute button, is there a way to allow the user to control the audio within flash without messing with anything else?
Thanks for all of your help.
Todd
Change Mute Button
I have this code:
var allsound:Sound = new Sound(this);
mute_btn.onRelease = function() {
if (allsound.getVolume() == 100) {
allsound.setVolume(0);
} else {
allsound.setVolume(100);
}
};
stop();
When the volume is 0, I want to display a different button (to show that the sound is already muted). How do I code that?
Mute Button Won't Work
Ok, so I have a sound playing from my intro scene and want to be able to mute this sound on my menu scene. I have read about importing soundmixers etc and have doen that but cannot get my button to work. here is my code:
Code:
import flash.media.SoundMixer;
Mute_btn.addEventListener(MouseEvent.CLICK,ClickHandler);
function ClickHandler (evt:MouseEvent) {
SoundMixer.stopAll();
}
Please help!
Mute Button Not Working
Hey everyone, I am trying to create a mute button in one of my movie clips. The way I have it set up is I have a child mc that has an "On" and "Mute" state that I've placed inside the movie clip I want to mute. Then, I put the following actionscript on the first frame of the mc I want to be able to mute but when I test the movie the mute button doesn't do anything. Here is my code:
ActionScript Code:
play();
var music:Sound = new Sound(new URLRequest("sea grant song yeah.mp3"));
music.play();
var soundVolume:Number = 1;
var muted:Boolean = false;
var sc:SoundChannel;
mute_mc.buttonMode = true;
import flash.events.MouseEvent;
mute_mc.addEventListener(MouseEvent.CLICK,mute);
function mute(e:MouseEvent):void {
if (sc!=null) {
var st:SoundTransform;
if (muted) {
st = new SoundTransform(soundVolume);
sc.soundTransform = st;
MovieClip(mute_mc.child).gotoAndStop("On");
muted = false;
}
else {
st = new SoundTransform(0);
sc.soundTransform = st;
MovieClip(mute_mc.child).gotoAndStop("Mute");
muted = true;
}
}
}
|