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


Similar Posts:


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

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

ActionScript 2.0 :: Control Sound With Play And Stop Buttons?

Mar 29, 2004

I am trying to control Sound with actionscript and play and stop buttons.

This is the script I have in frame one of my scene.

[Code]...

playB is the instance of the play button stopB is the instance of the stop button the sound intro is on its own layer and is selected as a streaming sound. My problem is that when I stop and start the sound with the buttons the sound starts from the beginning instead of playing from the frame it is in.

View 3 Replies

Sound Stop All Sounds Works / Then Sound Starts Again?

Jan 5, 2010

I am using FLASH CS3.I have gone through many posts, seems to be an issue with many people.Still haven't come across a fix.Website made in FLASH. Flash movie loads and sound works great!I have a button with 'StopAllSounds' action script.[code]When I go back to main page... sound starts up again.Is there a way I can stop all sound regardless of where the visitor goes on the website?

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 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 :: Stop Only Flv Video Sound And Continue The Bg Music To Play

Sep 3, 2010

I made a webiste with bg sound home, portfolio, gallery, contcts. This  are the links. when click portfolio, which contain a flv file, when  clicking the flv file bg music stop and video will play smoothly.But if i  navigate to other links the sound from the flv remains their and my bg  music not playing also.. one code SoundMixer.stopAll();  i got this code  b4, it vil stop all sounds... i dnt need to stop the background music, i  need to stop only my flv video sound.. there's a bg music playing, when  entering to the portfolio section thers a flv video vth sound. i can  stop all other sounds ven playing this flv video but i cant stop this  sound ven navigating to other sections and i need to continue the bg  sound ven navigating to other sections...

View 1 Replies

Actionscript 3 :: Sound Performance In Loop - Stop And Play Again For Synchronous

Jun 2, 2011

i am using soundmanager to order sounds. my site preview, in home page, square shapes comes into stage and you can drag drop them, all shapes binded its own sound. if they are colliding binded song will play.

the problem is i have 3 second timer to control sounds. every timeout i have to stop sound and play again for synchronous issue, that is my solution for that part. but sometimes before loop, there is an annoying little silence.

View 1 Replies

ActionScript 3.0 :: Flash Play Stop Root Timeline Sound?

Aug 15, 2010

I have added some three sound clips, play pause buttons, on the root timeline in a movie with corresponding callouts. I am able to stop all sounds on the main timeline by below

stop_btn.addEventListener(MouseEvent.CLICK, stopSound);
function stopSound(event:MouseEvent) {
SoundMixer.stopAll();
}

But now how do I resume all the sound to play. In sort, mute unmute root sounds in AS3.

View 1 Replies

ActionScript 3.0 :: Sound - When Press Stop Then Play It Only Plays From The Last Pause And Not The Beginning

Apr 26, 2009

i'm habing abit of problem with this code, its supposed to play pause and stop, the problem being that when i press stop then play it only plays from the last pause and not the beggining how to get it to play from the start after the stop button is pressed

[Code]...

View 1 Replies

ActionScript 2.0 :: On The Mouseclick Rollover Loop To Stop And The Down/click Sound To Play?

Aug 16, 2009

I created a movie clip that I am using as a button. I created the states in the clip (up, down, over) and the graphics work, but the sound is driving me crazy. I have a rollover loop that plays and a special click sound on the down/press. On the mouseclick, I want the rollover loop to stop and the down/click sound to play. Also, a getURL is happening on the release. Basically, everything works, except you can't hear the down/click sound. All sound just stops on the click.THis is AS2. Here's my code on the first frame. In the clip/button itself, I have the states labeled, the sounds placed using the properties and a stop on each keyframe of each state.:

playa.onRollOver = function() {
playa.gotoAndStop("_ovr");
}[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

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

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.0 :: Roll Off Button To Stop Sound

Apr 28, 2009

I'm trying to make a button that plays a sound when the mouse rolls over it and when it rolls off it stops. I've got the roll over play working but I can't get the roll off stop to work. So far I have this (I'll be adding more buttons with more sounds later, which is why it's in an if statement):

[Code]....

View 2 Replies

ActionScript 2.0 :: Button To Stop A Sound Event?

Aug 3, 2007

code to apply to a button to stop a sound event.

I have a series of buttons, when pressed they play a sound event, but when you click on the next button, the previous sound is still playing.

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

ActionScript 3.0 :: NetStream Choppy - Make A Character Start To Talk When The Sound Starts And Stop Talk When The Sound Stops

Aug 5, 2010

Need to make a character start to talk when the sound starts and stop talk when the sound stops so I'm using this:

[Code]...

View 2 Replies







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