ActionScript 3.0 :: Audio Keeps Repeating And Won't Stop
Dec 14, 2011
I have a .fla that plays music until a certain text object (start_course_txt_mc) is visible. Then I want the music to stop and the narration to begin. I can get all that to happen. The problem is that the narration keeps playing over and over, but it is only playing about 3-4 seconds of an audio file that is about 30 seconds long.
function unBlur()
{
var my_bf:BlurFilter = new BlurFilter(0,0,1);
I have a website with a mc inside a mc. The nested clip keeps repeating , I want the nested clip to run 1 time. I have stop actions on each clip, it delays, but won't stop repeating.
I am dynamically playing a video.flv file on the stage when a button is clicked. It plays fine but continuously repeats itself. I want it to play once and the disappear.
When i play it it autoplays (that's fine) but it also keeps repeating over and over, i'd like it to stop at the end and just display the end frame (as mentioned i converted a movie so i cant do it with actionscript in the .fla file).
how do i stop an animation from repeating once it has finished executed.
What i had wanted to do: was to play an animation once when the player has been hitted by a rock and increased an animation counter. So after say, the counter has reach 2, the animation will stop. But when i tested it out, the counter only execute once yet the animation just keeps on playing.
Code: var j:int = rockArmy.length - 1; var rock:Rock; while ( j > -1 )
I'm developing a game for my final year project at university that has a character who can move up and down on screen. The upper half of the screen is reflected in the lower half so that there are actually two characters on screen at once, each reacting exactly the same way to keyboard input.One of the mechanics involves the two avatars changing positions relative to their halves of the screen which requires a spacebar press to execute. The problem I'm having is that I don't want the characters to change positions once every frame if the spacebar is held down. I need to implement some sort of delay once the spacebar is pressed so that the characters won't swap positions for another second or so.
Code: var plachaFlipPointY:Number = char.mc.y; var shadowPlachaFlipPointY:Number = schar.mc.y;
So, I have a 3 minute mp3 file on my stage; the idea is to provide background music for my animation. So I go to preview the animation, and everything works fine, until I stop the preview. Then the audio keeps playing on and on. If I hit the preview again, obviously the music starts up again, and then won't stop, in a vicious circle of death that has me fleeing from the room.
To make it clear, I'm not previewing the audio file, I'm previewing the entire animation with the audio file on the stage.
I made a simple audio player following a tutorial on Youtube. It seems pretty good, except that the tutorial just starts and stops the sound file. I need it to be playing and for it to pause and resume.As it stands now, the music does play, but the pause button does nothing.Here is the script:
Code: var loadSnd:URLRequest = new URLRequest("http://jeffreyworthington.com/intro_music.mp3"); var thisSnd:Sound = new Sound();
creating a button within a movie clip that will pause both the images (bmps) on the screen and the sound, which is being loaded by AS3.Here's the code for my sound.
Code: //This assigns an abreviated name to the StorySongBook class which is inside the StorySongBook.mp3 properties. var sbs:StorybookSong = new StorybookSong();[code].....
How do I assign this to a button on the stage though (event listener?) and get the button to stop both audio and visual?
I have a video on my site (progressive download, flv file, imported using flash cs3 video encoder) and I used the FLVPlayback component with a simple skin. The video works great, my only problem is that I want the sound to stop when I click on other buttons on the page. The way I designed the site (maybe not a great set up) everything is in one big swf file, so when you click on another button on the page to show another project, the sound from the video file (that is no longer showing) is still playing.URL...
So my FLV videos play just fine, however when I click on any of the navigation buttons to visit another section of my website, the audio keeps on going. There must be some simple AS to stop the audio once a button is clicked. As it is now, the user has to stop the FLV video manually by clicking the stop button on the FLV playback component.
I'm trying to build a simple portfolio website, which displays images and videos. I imported a video, and got it to play when a certain button is pressed. But when I press another button (to go look at an image, for example) the video's audio keeps playing. How do I make the audio stop whenever another button is pressed?
I am new to Flash action script and i have problem with action script code. Even though i comment the mvMyVid.play(); still the audio plays for fraction of second and stops.[code]...
I have a swf loading in another swf that has a video player in it. When I remove the swf from the stage, the swf goes away but the audio from the swf keeps playing. Is there a way to tell that swf to stop playing from the parent swf?
I have a button that when the user rolls over it, it plays a 3 second piece of audiothat works fine.When the user rolls off though, the audio still plays, that, if the user rolls over the button several times you get multiple instances of the auduo until they all play out.
So far my code stops the sound but once it has stopped the sound no longer works. I don't see any errors reported. It is as if the event listener no longer listens... stop(); var soundClip:Sound = new Sound(); var sndChannel:SoundChannel = new SoundChannel(); var soundClipCompleted = false; var isPlaying = false; soundClip.load(new URLRequest("tune.mp3")); [Code] .....
Sometimes I get ahead of myself and have to stop and say how the hell did I do this before? I'm referring to a simple stop button I need to put in a flash animation. I know how to code calling a sound from the library, starting and stopping from a btn. But how do I stop audio that is streaming inside a layer from a button ?
var my_sound:Sound = new Sound(); my_sound.load(new URLRequest("yoursoundfile.mp3")); var my_channel:SoundChannel = new SoundChannel();
I've been given FLAs that contain audio embedded within the timeline. It's been a long while since I've had to deal with audio in this manner and I'm running into a problem.
The basic setup is this:
- There are 3 movie clips within the FLA
- Each movie clip contains embedded audio within the timeline
- The audio plays as soon as each movie clip begins
Here's my issue:
On the main timeline, there is a 'back' button which allows the user to move to the previous movie clip.
When the user clicks this button, it does move back to the previous movie clip; however, the sound does not stop which results in 2 audio files playing at the same time.
If I were calling the sound utilizing SoundMixer/SoundChannel, I know how to ensure the audio stops, but since the audio is embedded within the timeline, I'm not quite sure the best way to make sure the audio stops when the preceding movie clip is called.
I am using some code I found through a web search to play a YouTube video inside an empty MC: this.createEmptyMovieClip("video_mc", 12); this.video_mc.loadMovie("[URL]"); video_mc._x=50; video_mc._y=280;
Problem is, I can't seem to get it to stop playing. I can have tried: video_mc.removeMovieClip(); And it removes the video on the screen but the audio from it keeps playing and won't stop. Check it out here: [URL] Click on VIDEO, start the video playing and then click on one of the other menu options and you will see what is happening.
I have a section of a site that has a voice over when you get to a page. I have a play/pause button that works fine, and plays and pauses the audio voice over. I have about 9 other buttons on this page that all have 'SoundMixer.stopAll();' in order to stop the embedded audio. This works the first time you click a button, but any button after that restarts the embedded audio.
Is there a way to make it so that Flash knows not to restart the embedded audio?
Do I need to make a sound variable and set it to 'false'. I am not sure what to do, or how to do it.
I have a video component play on frame 1. When my movie goes to frame 2, the audio continues to play even though the video component is no longer on the stage.
I am creating a flash project which contains video on a few pages. The project also contains background music which loops continuously. The goal is to have the background music stop whenever the user is on a page containing video and for the music to play again when the user leaves said page. The script I created works to stop the music, but it also stops the audio contained within the video and causes the video player (by proxxus) to lock up.
Here's the setup: Library: music.wav - linkage = "myMusic01"
Main Timeline: Code: //-- create a variable to determine if the current movie contains video var currMovie:String = "notVideo"; //-- start playing sound object myMusicMc.myMusic.start(0, 999); [Code] .....
On the actions layer of the movie clip containing my navigation controls snippet of the callback used Code: videoLink_mc.onRelease = function() { _parent.prodDetail_mc.gotoAndPlay("video"); _root.currMovie="Video"; } on all the other buttons currMovie is set to "notVideo".
I've inserted a flv video ( from Import to stage) on the 1st fotogram( my homepage), and then I've extended it for 24 fotograms( because I set at the beginning 1 second = 25fps).If I play the video (with the play button of the "flash prebuilt player") without stop it and I'll surf toward another page the sound still playing, how can I fix? I mean I'm in the homepage, I start the video with the play button on the "flash prebuilt player" and if I don't stop the video and I surf towards another page the video disappear but the audio is still playing on the background. Which command ? I've try with stopAllSound(); on the fotogram 25 but it doesn't work and the audio is still playing.
The situation is I have a number of pages with a single movie clip on each, however once the movie is playing and you click the home or contact buttons for example, it will go to the correct page but the movies sound keep playing in the background. So I've got a code, but I just get an error sayign tanmovstop() does not have a body. I'm very new to action script so am very lost! I'll be extremely grateful. The code on the sites main buttons is as follows, with tanmov being the movie whos sound I want to stop:
I have an embedded video object in a single frame. A script attaches an external FLV file which plays upon entering the frame. When I leave the frame to go to other parts of the movie, the music from the attached FLV continues. How can I stop the audio when I leave the frame?
Here is the issue I am running into. I have built my site in CS3 and I have used a loader.On my site I have embedded video links, when the other video links are pressed, the audio from the prior swf keeps playing. The site[URL]
It's about a live support chat. When a member wants to contact me, the chat is ringing (so this swf audio file starts playing). Whenever swf audio alert starts, I get a link: "user X wants to chat, click here to respond".
After I "click here" a new pop up window (the chat) opens, but the swf audio keeps playing without ever stopping, it's like answering the phone, talking but still ringing.I tried the function doStop(); - not working. I tried attaching to the "answering link" different commands but couldn't make it.[code]...