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


Similar Posts:


Actionscript 3 :: Stop Sound And Video When Clicking A Menu Button To Go To Another Frame?

Mar 28, 2010

I have a problem with my slideshow script. I have embedding a flash video file into my website with this slideshow called monoslideshow, and everything seems to work perfectly. Trouble is, when I am clicking on another menu button that should jump to another frame, it still keeps playing the video and sound while displaying the new menu data.So I will probably need some code that stops the video instantly, when another menu button is clicked. But how do I write it and where do I put it?

Here is my actionscript for the video file to show:

var loaderSlide:Loader = new Loader();
var monoslideshow:Object;
loaderSlide.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
addChild(loaderSlide);

[Code]...

It would be great to get a solution to this problem, otherwise my website will be kinda messy ;)

View 1 Replies

Stop Interval Function By Clicking Button?

Mar 26, 2009

I have a simple movice clip, 72 frames. On Frame 42 I have this actionscript

//----------------------------------
function wait2() {
stop();

[Code]....

and a few other "possible" solutions I found on the web....but nothing works. If I click the damn button...

View 2 Replies

ActionScript 3.0 :: Sound Only Plays When Clicking On Pause Button

Sep 2, 2009

All my sounds work however, the play button only seems to play my sound when I click on the pause or stop button first! Plus, my stop button acts like a pause button, it doesn't start the song from the beginning once it stops. [code]...

View 3 Replies

ActionScript 2.0 :: Sound Attachment - Click On The Objects First Before Clicking On The Play Button

Sep 21, 2006

I have been trying to deal with sound attachment. Attached is the source file that i am dealing with(I deleted the sound files because the size is too big): Simply, i have to click on the objects first before clicking on the play button. Each objects i clicked represents a different sound and will be stored in the array. So i will be clicking the objects in sequence and when i click on the play button, the music will play. Now comes the problem with my coding, I was unable to let my music coming out one by one at the time in sequence.

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

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 :: Fade Out A Sound Loop Without Using A Button?

Sep 28, 2006

I have a small presenttion that have a Loop of a song starting to play on the Scene 1. The sound plays in loop along the several scenes and I want it to Fade Out on Scene 12. Is there any way to Fade Out without using a button to do that? I have tryed the Fade Out on "Effects" (on Properties panel), but doesn't work...

View 6 Replies

IDE :: Sound On/Off Button; Loop; Auto-play?

Jun 23, 2008

I'm almost done building a full flash site where it navigates by position of timeline.I just need a simple on/off button for a soundloop to loop and play automatically. the on/off button just simply turns it off (toggle is optional). on it doesn't have to resume, just start the pool again.

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

Actionscript 3 :: Write Script For Clicking Button Using Following Code For Creating Button Dynamically?

Nov 11, 2011

i have to generate a button dynamically... and have to keep a click handler for the same how to write script for clicking buttonim using following code for creating button dynamically

var btn:Button = new Button;
btn.label = "Print";

View 2 Replies

Loop A Video With A Play/stop Button In The Middle?

Aug 21, 2009

I have a .mov file and I want to simply encode the video (i assume with flash media encoder) to be a flash file which loops continuiously with a Play/stop button. I'll then have this movie playing on my html page.

View 1 Replies

ActionScript 3.0 :: Creating Button To Stop Playing Sound?

Dec 11, 2009

I'm trying to make a stop button to make it stop playing the sound. But I get an error saying:
TypeError: Error #1006: stop is not a function.
at sound/SoundStop()

Here is the function for my stop button:
function SoundStop(event:MouseEvent):void {
cs.stop();
isPlaying:false
}

View 5 Replies

ActionScript 3.0 :: One Button For Sound Start & Stop Flash?

Mar 18, 2011

I am trying to create a sound button to start a sound and then stop it when clicked again. I thought it would be easy because there is a code snippet for "click to play/stop sound"
 
I have my sound file in my library.
 
Below is the code that is not working:
 
Instructions:1. Replace [URL]below with the desired URL address of your sound file. Keep the quotation marks ("").*/
 
CYOA2bttn.addEventListener(MouseEvent.CLICK, fl_ClickToPlayStopSound_11);
var fl_SC_11:SoundChannel;
//This variable keeps track of whether you want to play or stop the soundvar fl_ToPlay_11:Boolean = true;
Proxy-Connection: keep-alive Cache-Control: max-age=0 Cp>function

[Code]....

View 7 Replies

ActionScript 2.0 :: Stop Movie When Click On Different Sound Button?

Aug 6, 2007

I have a flash animation with three different icons which play individual audios.

In one of the movies called 'bird' that I want to stop, I have in the first frame following code.

Code:
x = new Sound();
x.loadSound("mp3/cocky.mp3", true);
which works fine.

This movie 'bird' is then inside another movie called 'container' , any everything then sits in one scene.

In the movie 'container' I have three buttons which play individual sounds using same 'x.loadSound("...' method.

You first see and hear the animation of the 'bird' and it's sound playing straight away. After a 30 sec sound and the animation stops.

All working so far fine up to this point... But What I need is , when the user clicks on one of the other buttons to play the sound WHILE the 'bird' is still playing, I want to stop the 'bird ' animation.

At the moment it stops the sound of the 'bird' but NOT the 'bird' animation. Naturally If I wait 30 sec 'bird' animation stops and no problems there after. Only if and when user clicks before the 'bird ' animation is the problem.

View 12 Replies

ActionScript 2.0 :: Clicking A Button - Select A Button On The Screen And Then A Movieclip Plays?

Nov 24, 2006

I have many buttons (symbols). This is what I want it to do: -Select a button on the screen, and then a movieclip plays. - If the user selects any OTHER button on screen, a message box displays a message.

View 2 Replies

ActionScript 3.0 :: Overlapping Sound - Home Button - Get The Music To Loop?

Dec 16, 2009

Everytime I click on my home Logo the music overlaps and plays again. How can I stop this? and... How can I get the music to loop? (I've tried the mySound.play(0,10000); code but it didn't work)

[Code]....

View 3 Replies

ActionScript 2.0 :: Onpress Button - Clicking On The Button Movieclip Moved To X = 100

Jan 17, 2010

how to do so by clicking on the button movieclip moved to x = 100; and when pressed repeatedly to x =- 150 event onRelease - not work:

[Code]...

View 9 Replies

ActionScript 3.0 :: Adding Two Functions To One Button (gotoAndPlay - Stop Sound)

Dec 10, 2010

I`d like to say that i`m total newbie regarding to as3. Ok, lets look at my problem.. I have 2 scenes (first is main menu with New Game button; second scene is intro for game). I`m having difficulties to make two functions within one button. Why do I need that? First function is to go to next scene (in my case, IntroScene). Second is for turning off sounds, so I can`t hear them in next scene. Here is the code:

[Code]...

View 9 Replies

Actionscript 3 :: Hide A Button After Clicking Another Button In Flash?

May 18, 2011

I am using actionscript 3 to make a point and click game. On frame 1 there are two buttons, button 1 and 2. On frame 3 there are two buttons, button A and B. I want it so that after I click button 1 on frame 1, button A on frame 3 will be hidden or when I click button 2 on frame 1, button B on frame 3 will be hidden. The buttons that are hidden do not do anything when you click them.

View 2 Replies

ActionScript 3.0 :: Video / Sound Won't Stop When Clicks A Menu Button To Go To Another Frame?

Mar 19, 2010

I am in frame 20 which is playing a video, How do I get it to stop sound and video when some clicks a menu button to go to another frame? Where do I put the code?0

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

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 3.0 :: How To Stop And Loop Sound

Feb 27, 2008

I have created a button which plays an external MP3 file, but the first problem is it only plays once. What script do i have to add so the sound continually loops. Secondly, I have created a button which stops music, but I can't figure out the code which stops the MP3 file playing. I've tried backMusic.close();, but an error message is displayed as the sound is already loaded up.

Heres the ActionScript Code:
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
[Code] .....

View 4 Replies







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