Professional :: Stop A Sound From Playing If It Is Playing Already
Dec 6, 2011
ok so i have a button that plays an animation for fire when held down. and when realsed goes to and stops and frame one. when it reaches the end of the time line it goes to and plays at frame 10 and goes back to the end of the timeline. I have a sound for the fire animation that plays for the effect. The problem is the sound keeps going untill its over even if the button isnt held down. and when the playhead reaches the end of the timeline it goes to and plays and frame 10 and it replays the sound. if i hold it down it will just keep playing the sound over and over from start to finish. what i want it to do it when i hold the button down i want it to play the sound and when released it stops the sound where ever it is at. I also dont the sound to play again if there is a sound already going to stop it from playing 20 sounds at one time it gets loud and you need asprin after about 5 seconds of that.
View 2 Replies
Similar Posts:
Apr 10, 2011
I am creating a game that has 6 movieclips all on the main time line of the game. Each movie clip has three buttons that when clicked plays, pauses or stops a sound clip.When I press any of the sound clip play buttons that sound starts playing, the problem is when I click any of the other sound clip play buttons those sounds also start to play. Is there a way I can disable the other sound clip buttons while the current sound is playing then enable all of the buttons when the current sound has stopped.
This is the code that creates one of the sound objects
[Code]...
View 3 Replies
Oct 3, 2009
So I made a few buttons with sounds within them and when I publish it they work just fine. But what I want them to do is;
Say I click a Button.The sound starts playing.Then I click it again, before the sounds done playing.I want it to stop the playing sound and start playing the button I just clicked on, whether it be the same button, or a different one.Right now it just ends up sounds like an echo because it'll play it as many times as you click it.
View 2 Replies
Dec 4, 2011
I am using AS2 in CS5.5.I am creating a project for a class that introduced me to adobe flash. The issue is I have gotten to a certain point about 15 scenes. During say the 15th scene scrolling through the timeline animations works fine, playing it on test scene works fine. When I go to play it on test movie it stops at a certain point. At first I thought it might have been a misplaced stop action but there is none to be found. The weird part is every other scene I create after that continues to freeze as well, the images are there, but the animations won't play. All my previous animations play before those with the issue, it's justThese new ones won't play for some reason in test movie, but work completely fine in test scene and the timeline.
View 4 Replies
Mar 4, 2010
I have several buttons on the stage, each one will play an external sound file when clicked. If the user has clicked say button_1 and then clicks button_2, I need to stop the sound currently being played, before starting the sound from button_2
This is my code:
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.net.URLRequest;
import flash.events.Event;
[code]....
So... how can I stop the sound currently being played, when the user clicks on the next button...
View 3 Replies
Sep 14, 2011
I have this code in the second frame to play a song, and it works fine. The class of the sound in my library being "MySound". var snd:MySound = new MySound snd.play(); Now I need the song to stop playing from a latter frame.
View 1 Replies
Nov 13, 2010
I have a sound clip that I'm loading externally into my flash file. The code I'm using looks like this and is placed in the as layer on the first frame,
var mySound:Sound = new Sound();
var myChannel:SoundChannel = new SoundChannel();
var myTransform = new SoundTransform();
var lastPosition:Number = 0;
mySound.load(new URLRequest("introaudio.mp3"));
myChannel = mySound.play();
[Code]....
View 14 Replies
Jan 8, 2010
I followed a tutorial using AC3 and flash CS4, to build a website for myself. Want to have a video file in my site with back ground music and sound effect. I did fine doing it but there is some problem I cannot figure out. My movie clip starts nice but half way through when I go to other pages, the sound and music plays in all the other pages. I have zero knowledge about coding and English is my second language. How can I stop that playing in other pages? I am trying hard to see if someone had same problem like I do but can's find anyone posted any thing.This is the code I have for that page with video on it.
var modelingboardTween:Tween = new Tween(modelingboard_mc, "y", Elastic.easeOut, 710, 0, 3, true);
modelingboardTween.addEventListener(TweenEvent.MOT ION_FINISH,donePlaying);
[code]....
View 21 Replies
Mar 30, 2010
i cannot get the sound that has started playing to stop.
Code:
var EdgenSound= new Edgen();
play_btn.addEventListener(MouseEvent.MOUSE_DOWN, playClick);
stop_btn.addEventListener(MouseEvent.MOUSE_DOWN, stopClick);
[code].....
View 4 Replies
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
Jun 28, 2011
I have created a form that has some buttons that open external swf files.Problem is when I close the external swf the audio keeps playing.If I turn off sounds the sound starts again when I load a new external swf.Here is the relevant portion of code;
function playMyMovie():void{ myrequest=new URLRequest(myMovie); myloader =new Loader(); myloader.load(myrequest); function movieLoaded(myevent:Event):void { stage.addChild(myloader); var mycontent:MovieClip=myevent.target.content; mycontent.x=100; [code]....
View 15 Replies
Jan 19, 2009
I want to stop my background music(audio) from playing when i click on a button which loads video[code]...
View 0 Replies
Apr 13, 2010
The problem I have is I click the play button and start playing. Then I click next and when I click play for another song the songs overlap. How can I stop whatever song is playing and start playing the new one? Has to stop the prev song when I click play_brn.
[Code]...
View 2 Replies
Nov 2, 2010
i've imported a flv video file to Flash for the intro and i create skip button to go next frame..but when i press skip..it stop at next frame but the sound of intro still playing.
View 3 Replies
May 16, 2010
I've run into a bit of a problem using Adobe's CS3 flash program in terms of lip syncing... I can place the sound files in the timeline at whichever point I like and so forth, but I have no way to play them in such a way where I can adequately make lip syncs. It's hard to explain, but in flash MX I would merely click the timeline, drag the cursor along it, and it would play the sounds as it did the frames, one piece at a time. That way I could tell where the consonants were and therefore where to change my characters' lips. This is not the same as simply hitting "enter" and letting the sound play in its entirety.
View 4 Replies
May 26, 2010
I can download video from youtube as FLV.Want to play back in my Flash swf file without sound.How do I mute the sound during user playback?
View 1 Replies
Feb 21, 2011
I am trying to make a shooting game and I am using the Pistol as a movieclip but it just won't stop playing!
View 1 Replies
Apr 29, 2011
I imported a video in my "about me" section of my website with a skin chosen from within flash. However, when I click within another section of my website, for example "Home" and go back to the "about me" section, the video starts playing automaticly. If your speakers are turned all the way up, you will jump.
What is the code I need to add to my video's actions layer to stop the video from playing automaticly and give the the user the ability to play the video themselves?
And what would be the code if I wanted to reduce the volume at 50% for example but have the video play automaticly?
View 5 Replies
Jun 22, 2011
Is there a setting for the length of time a video plays. Video streams are stopping after playing for about 4 minutes.
View 3 Replies
May 3, 2010
I found this code to play sound:
myButton_btn.addEventListener(MouseEvent.CLICK, buttonIsClicked); [code]....
I got it working fine, but was wondering how to program a function for another button to stop stop playing that sound?I tried a function with snd.stop(); but that seems to be incorrect.
View 6 Replies
Jul 29, 2011
I have made a 5 min animation with stream sound. Its playing perfectly in PC. But in mac, its not playing. Stream sound starts from frame 60. So mac plays the swf plays till 60 frame, after that it pauses. I tried importing different sound format (wav, aif, mp3) and tried with all sound export setting but the problem remain same; its playing only till 60.When i removed the sound, it played till end. Even with event sound, it plays till end. But with stream sound, the problem. The problem is only in mac; in pc its perfect.I am using VMware Mac OS x leopard in window xp for testing purpose.
View 2 Replies
Nov 25, 2011
For a class project I have to make kinetic typography and so I need text to go along with some audio from a movie (in Flash). Every time I press enter to preview what I've done and what I have to do next, the audio starts and doesn't stop till it's done and this is a little over a minute long, and it's really annoying. If I don't start from the first keyframe, I can't even hear the audio, it doesn't play if I play from the middle. How do I press enter to play and have it stop when I press enter again? I can load the swf by CTRL+ENTER but then I can't see what frame I'm on and what frame I want. :|
View 4 Replies
Aug 17, 2010
Basically I have a flash website built on different frames of the timeline, the simplest way I think.Some of these frames have movie clips embedded into them using the flv playback component class.The problem I have is the following, the site works fine and videos play fine, but whenever I navigate offa part of the website to another, from a frame to another - the sound of the clips that were playing keepsplaying on the background and never stop and it keeps building up every time I navigate of.f each page.I want to remark that I believe is not only the sound that keeps playing "invisible" but the whole clip butThis is the AS code for my buttons on an example frame, would you be so kind to tell me what I should add or change
stop();cvbtn15.addEventListener(MouseEvent.CLICK,onClick25);function onClick25(event:MouseEvent){ gotoAndStop(27);}showbtn15.addEventListener(MouseEvent.CLICK,onClick26);function
[code].....
View 3 Replies
Aug 1, 2011
I'm trying to play a sound using a technique found here (play the sound by sampling raw sound data gathered from the original with extract()), with the difference that the mp3 sound is embedded in the swf, not loaded externally. This is my code:
var soundBytes:ByteArray = new ByteArray();
var mp3sound:Sound = Sound(new Sound1_design()); // this is the embedded sound
mp3sound.extract(soundBytes, int.MAX_VALUE);
[Code]....
This works, in a way, except that the resulting sound is distorted (it has a kind of a metallic ring).
View 1 Replies
Jun 22, 2003
I am loading small sounds dynamically with the loadSound command. These small sounds are activated with a rollover. see script below. This works ok. however. i want the first sound to keep playing while the rollovers load sound. a bit like playing the piano. This works ok when i import all the sounds into the library and place them on their very own button. however the size of the flash movie increases to 140k. whereas when i load them dynamically the size of the movie is 20k. obviously i want to load dynamically.
But with dynamic loading each sound stops when another sound is rolled over, so that there is only ever one sound playing at once. I need to load the sound into a different level or something, so that the first sound can keep going while the smaller, shorter sounds play over the top. this is my script below. The first sound loads when the movie starts. This is the one i want to keep playing. Then there are the smaller ones with rollovers. does this make any sense? there's actually 13 little sounds.
[Code]...
View 3 Replies
May 4, 2011
The thing I don't understand is how to assign a sound to a soundchannel without playing the sound. All the examples I've seen do this.
Code:
_SoundChannel = _sound.play();
_SoundChannel.stop();
And how can I set a SoundChannel volume to zero before allocating a sound to it?
View 2 Replies
Jan 23, 2011
I have a layout with narration and a nav bar. When I click a nav button for section 2, the audio from section 1 (set to stream) continues to play over the audio for section 2. This cumulates so if I click buttons for sections 3, 4 and 5, I get five audio files playing on top of each other. Sections are individual movie clips with embedded audio streaming on a Sounds layer in each movie clip.
View 3 Replies
Sep 2, 2010
Im making an animation and in the 3rd scene i have a deer that screams and the sound plays way to early. I had to drag it out way past the frame where it opens its mouth for it to play at the right time.
I have no idea whats wrong this has happened before. I really dont want to have to guess on where to put the sound for everything a character says.
View 2 Replies
Sep 21, 2009
Back to my nightmare project, I've embedded sounds in the project that play based on certain user actions. They play fine for me (PC), but my customer is telling me they don't work for her (Mac).Would there be ANY reason a sound would play on a PC but not a Mac?I've told her to update her Flash player to make sure it's current and to make sure her speakers are on and the volume is up, but no sound.Okay, the REAL reason this isn't working is user error based on everything else I'm told that's happening and not happening, but I need to cover my bases and see if there really may be a reason sounds won't play on a Mac.
View 3 Replies
Aug 7, 2009
I am loading an external SWF file into my main timeline. The external SWF file contains an FLV video. At a certain point in my main timeline, the SWF file loads and plays the video. Is there a way to say...
If the VIDEO (FLV) is done playing, gotoAndPlay(X)?
View 4 Replies