ActionScript 3.0 :: Controlling Sound File With Play Stop And Mute Button

Oct 6, 2010

the method for stopping/playing sound in 2.0 don't work for 3.0. i can stop the sound by going to a different page/frame on the site.but i want the buttons.

1. play button?

2.stop button?

3.mute button?

View 1 Replies


Similar Posts:


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

ActionScript 3.0 :: Play / Stop Sound On One Button?

Jan 27, 2011

When you click the first time on the button, it should start the song, when you click a second time on the button, it should stop the song. how do i make this with actionscript 3?

View 1 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 1/2 :: Pause, Stop, Play A Sound That Is Loaded From The Other .swf File?

May 6, 2009

Pause and Resume external SWF sound filesI have this code that plays the sound through linkage. It reside in scene1.fla -> scene1.swf.

var mc:MovieClip = this.createEmptyMovieClip("mc",1);var myLoop:Sound = new Sound(mc);myLoop.attachSound("bg_sound");myLoopVolume=0;myLoop.setVolume(myLoopVolume);
mc.onEnterFrame = function () {  if (fadeIn01==1) {  

[code].....

View 1 Replies

ActionScript 3.0 :: Play / Stop Button - Current Audio File To Play The Next One

Feb 27, 2012

I have created two buttons for separate audio files. Essentially if you click on the button it will play and stop. This works great! I have also injected a SoundMixer.stopAll(); to ensure if you click between both buttons that it will stop the current audio file to play the next one. My problem is when I select the 2nd button for the first time everything seems to be working...it's when I attempt to click on the first button again, that it will require 2 clicks and then it stops and plays accordingly...anyone know how I could eliminate this annoying two click process?

[Code]...

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

ActionScript 3.0 :: Mute Button For Sound In Timeline?

Sep 27, 2008

I want to add a mute / unmute button for sound that must remain synced to my animation. It sounds like a pretty straightforward task and I'm embarased that THIS is where I've gotten stuck while I've gotten through some stuff I thought would be way harder on my own. The reason this is a problem is because in considering 2 approaches I've run into a wall. I'll gladly accept any advice to circumvent the roadblock either way.

Approach 1 is to add the sound to the library, drop it in the timeline as a stream and build my animation to match. That works just fine, but I can't find an instance name for the sound to run a setVolume function against (not even sure if it would be that simple, but without an instance name, I can't move any further forward; I tried labeling the first frame of the sound layer 'narration' and trying refernces like timeline.narration, timeline, narration, and so on, but no joy).

Approach 2 is to import the sound using URLRequest, instantiating the sound and setting the volume against that instance. Works like a charm but the sound drifts out of sync with the animation (that was synced perfectly when it was in the timeline). This is my less appealing option because I'm using nav buttons taking me to various frames and the sound (which used to pick up at the right frame when it was in the timeline) just plays on without regard to the point in the animation. It's not a surprise to me that this happens, but if I were to do this I'd need to write code into my nav buttons to pick up the right spot in the sound instance and I'm not sure how to do that.

View 5 Replies

ActionScript 1/2 :: Set Sound Volume To 0 On A Mute Button?

Mar 10, 2010

I'm very new to flash and i've made a movie for a website [url]... and i want to set the sound to 0 on my mute button at the moment i've put [code]...

View 1 Replies

ActionScript 3.0 :: Mute Button- Turning Sound Back On?

Dec 30, 2008

I've made a mute button for my embedded FLV sound. I'm usingSoundMixer.stopAll(); as the controlling action. How do I start thesound up again? From what I could tell, there wasn't aSoundMixer.playAll();, which would be the logical choice.The sound is embedded into the FLV, so I don't have direct

View 5 Replies

ActionScript 2.0 :: Mute Toggle Button To Specific Sound Clip

Jun 3, 2011

Creating the necessary code to make a mute/unmute button in ActionScript 2? I would like the "toggle" button to control a specific sound clip only -- not any other sound within my presentation. Basically I have an intro animation of about 20 seconds that has background music to it. I would like to add a mute toggle button that controls only this music clip and not any other sound found within my presentation. Is this possible? I've seen code for "globally" muting or stopping sounds. I need code for just a specific music clip (sound object?).

View 6 Replies

ActionScript 3.0 :: Controlling - Sound Will Stop When Goto Page 2

Jan 17, 2011

for example i have a two pages, in page 1 theres a sound thats playing, but if i will try and go to page 2 the sound will stop, but if i will go back to page 1 the sound will be played again..

View 4 Replies

ActionScript 2.0 :: Bar - Play And Stop Button To Play And Stop Frames In A Flash Movie

Dec 1, 2004

give me the actionscript for a bar that has a play and stop button to play and stop frames in a flash movie. i would be gratefull if you could as i am really stuck

View 2 Replies

ActionScript 3.0 :: Play A Sound File And Show The Progress Of The Sound File Being Played

Mar 16, 2009

I have to play a sound file and show the progress of the sound file being played. I am using import flash.media.Sound; import flash.media.SoundChannel; But the PROGRESS event gives theprogress of loading of file. I want to know of much of the song has been played and how much more is left.

View 3 Replies

Actionscript 2.0 :: Mp3 Player - Keep The Mute State Unchanged When The Songs Are Playing Until The Mute Button Is Pressed Again

Feb 3, 2009

I've downloaded the the Flash mp3 Player. I did some minor modifications to it and it works well. The only problem I have is that when the mute button is pressed, the current song is mute(s.setVolume(0)), but when the next song comes up, the mute button is not in mute state(Volume not set to 0). I want to keep the mute state unchanged when the songs are playing untill the mute button is pressed again.

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

ActionScript 2.0 :: Sound - Stop Button To Allow The User To Stop Mid Song

Mar 13, 2007

i have programed a play button using:

[Code]...

now i am trying to program the stop button to allow the user to stop mid song....

View 4 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 3 :: Mute The Sound And Still Get Sound Data From SoundMixer.computeSpectrum?

Jun 25, 2011

I wrote something to capture sound from my microphone. I can visualise the sound data with SoundMixer.computeSpectrum.is there a way to mute the sound and still get sound data from SoundMixer.computeSpectrum?Now I have this:

sc=son.play();
var t:SoundTransform = new SoundTransform(0, 0);
sc.soundTransform = t;

but I do not get any data. if I pump up the volume, data comes through again(I need to mute it because it will echo otherwise).

View 1 Replies

ActionScript 2.0 :: Play Sound Like "stop All Sound" Option In Flash?

May 17, 2003

I want to use a sound loop in my flash movie. The movie has many scenes. And the problem is that when I go to next scene or different scene I hear the sound repeating twice. I mean sound does not stop from first scene and begins from the different scenes.Is there any way to play sound like "stop all sound" option in Flash.

View 6 Replies

ActionScript 2.0 :: Mp3 Sound - Play And Stop

May 2, 2006

I made to player with only the buttons play and stop, I tried to make that button toggle, but I did not works, then I made two buttons, when I click in play it shows a button and hides the other and vice versa, he functions normal, my problem is the following one:
When finishes the music the button not return for stop button, it continues showing to the animation of the play button , How can I make when to finish the music the button comes back to the state where it was.

[Code]...

View 2 Replies

ActionScript 3.0 :: Create Dynamic Sound To Play Sound-file?

Oct 14, 2009

It's possible to play a sound file through AS, either by loading it from a folder or import it to flash. It's also possible to play a dynamic tone with flash.media.Sound + writeFloat.

But... is it possible to play a sound file with flash.media.Sound + writeFloat in some way? I want to play a sound file without having to deal with any files except the .swf!

View 9 Replies

ActionScript 3.0 :: Get Main Timeline To Stop In The Beginning On Button Press To Play And At The End Stop Again?

Feb 1, 2008

I just got Flash CS3. I'm trying to get my main timeline to stop in the begining, on button press to play and at the end stop again. In AS2, you would just put stop(); on the first keyframe and stop(); on the last key frame and program your buttons accordingly.

The stop(); does not work!!!! It's driving me crazy. What am I missing? I've gone through the tutorials in Flash and they don't work either.Also, if you have MovieClip that contains an animation and you don't want the movie clip to be on a continuous loop how do you stop it from playing. In AS2, I would put a stop(); on the last keyframe of the movieclip's animation. This also does not work in AS3.

View 9 Replies

ActionScript 3.0 :: Mute/unmute The Volume For An Internal Aif Music File Using A Button?

Mar 9, 2009

I need the code to mute/unmute the volume for an internal aif music file using a button.

View 2 Replies

ActionScript 2.0 :: Stop A Sound Then Play Another And Back To It ?

Sep 4, 2010

Stop a sound then play another then back to it ?look at the Attachments files

View 2 Replies

ActionScript 3.0 :: Play Sound Automatically Stop Another?

Jan 11, 2010

I have 2 samples that play with a click on a button, however, I want one of them to stop playing if the other one is played; so that only one sound will ever play at any one time.

View 9 Replies

ActionScript 3.0 :: Play Sound In First Class And Stop In The Other One?

Apr 9, 2010

I am trying to make some sound script for my website, but I need to stop the sound when portfolio's class will open.[URL]

View 7 Replies

ActionScript 3.0 :: Make The Sound Play First And Then Stop It?

Feb 10, 2011

make the sound play first and then stop it?

var music:Sound;
var trans:SoundTransform;
var channel:SoundChannel;
var musicOn:Boolean = true;

[code]...

View 0 Replies

ActionScript 3.0 :: Making A Sound Play Once Then Stop?

Dec 14, 2009

When my avatar bug makes contact with another type of bug, he eats it. Both bugs are movie clips; when the avatar gets into the collision detect zone of the edible bug, it triggers a quick animation in the "edible" bug: he becomes a blur for one frame then disappears (as though eaten).

The problem is the sound effect - a quick "whoosh". It needs to play once then stop. What happens now is that it's triggered repeatedly - a problem if the avatar passes over the edible bug slowly. If the avatar later passes over the spot where the edible bug was, the sound is triggered multiple times again. So I need the sound to play only once, then stop. There will be several copies of the edible bug's movie clip that need to behave the same way, so once the sound stops playing it needs to be available again for the next collision.

Here's what it looks like now:

private var sfx_edible:Sound = new eat();
function detectCollision(myevent:Event):void {
if (avatar_mc.hitTestPoint(edible_a.x, edible_a.y, false)==true) {

[code]....

View 1 Replies

ActionScript 3.0 :: Controlling Sound In Animation With Button Click - Error 2068

Apr 13, 2010

I seem to be getting this error message when I click on any of my button which are controlling the sound in my animations.
ArgumentError: Error #2068: Invalid sound. at flash.media::Sound/play() at Conventional1_fla::MainTimeline/pSound()

My sound is working and all the buttons are working as wel but this error message keeps popping up in the out frame.
stop()
import flash.events.MouseEvent;
import flash.display.Sprite;
import flash.media.SoundChannel;
var loadSnd: URLRequest = new URLRequest("");
var Snd:Sound = new Sound();
[Code] .....

View 2 Replies







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