ActionScript 2.0 :: Stop A Movie From Playing?
Jan 8, 2007how to stop an swf playing movie?
View 4 Replieshow to stop an swf playing movie?
View 4 RepliesI 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 RepliesI have an swf loading on to my main timeline:
_root.createEmptyMovieClip("container", 1);
loadMovie("bucs.swf", "container");
container._x = 549 ;
[code].....
I have used previous versions of Adobe Flash and now have Professional CS5.5, and I am coming to you with an embarrasingly, ridiculously stupid question that is absolutely stumping me. My movie cannot stop playing, no matter how many stop(); I've embedded in there. I created a layer on top, added the stop(); code at the end of the scene, and the swf ignores it and starts playing the next scene. As an experiment, I put a stop(); on the very first frame of the .fla, but that too is ignored. I have dozens of stop(); action commands riddled throughout the movie, but not a one of them is capable of stopping the exported movie from playing and looping. I assume there must be some simple, easy property or code trick or document preference or something that I've overlooked, but I can't for the life of me figure out what it is.
View 3 RepliesI have a flash web banner that I need to embed in some pages. The banner is a small movie. I don't want it to play on some pages as it can get annoying. I tried setting the following but it didnt do anthing:
Code:
<param name="play" value="false" />
How can I prevent it from playing?
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 RepliesThis is probably an easy question, but I fairly new at this. How do you let a movie clip play once then stop it on its last frame? I've noticed that you can't use AS on a movie clip frame like you can in the parent timeline. That's what I was trying to do.
EDIT:I figured it out. I just wasn't setting the parameters. I'm going to have a hard time with AS3 LOL
i just did the load sound bar tutorial (great tutorial btw) and i made an animation that said loading, but i dont know how to get it to stop after its done loading
View 1 RepliesI have a file with 3 movie clips and three buttons that control them to play...with the script below It is working fine.
stop()
function startImageOne(Event:MouseEvent):void [code]......
I have a movieClip name BlackScreen. In that BlackScreen mc I have a timeline which stops and a video which I converted to a movieClip named video_mc plays on that frame.I have a button named x10_btn in BlackScreen mc which navigates back to my main timeline. Can someone please tell me how to make my movie stop playing when x10_btn is pressed. when I imported the video I chose "Load external video with playback component" .Here's the code in my actions layer of BlackScreen mc
stop();
x10_btn.addEventListener(MouseEvent.MOUSE_DOWN,mouseDownHandler10);function mouseDownHandler10(event:MouseEvent):void { gotoAndPlay(41);}
Once playhead gets to frame 41 the BlackScreen mc has completed animation and returns to main timeline.Currently, when playhead reaches back to main timeline the video sound continues to play and overlaps other sounds.
[code]That is the code used to solve the cache problems, but i dont' really get the second line. How does changing the level or target of the new movie stop the old file from playing?!i also searched what "?" does in flash, but i couldn't seem to find it.
View 3 RepliesI have a movie clip that runs in its own timeline. I want to stop the movie clip from playing whenever the mouse is clicked (in this application I am actually using a touch screen and I want the movie clip to stop playing whenever the screen is touched). In addition, I want the movie to rewind back to frame one so that none of the movie clip images are left on the screen.
View 3 RepliesI 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]...
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.
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]...
I have four movie clips (.f4v) in 4 frames in a movie with watch buttons.. This movie has them been imported into a main movie container that has next and previous buttons. However if i play a movie then hit next frame, the movie continues to play in the background. The code below shows one of the actionscripts for a movie clip and then the main actionscript in the main movie.[code]...
View 1 Repliesok 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 RepliesI put the "stop" action at the end of my movie on the last keyframe, but the movie doesn't stop!
View 14 RepliesI 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)?
I was wondering, what was the best way to for actionscript 3.0 to detect cuepoints playing from a FLV movie that is playing from an FLV playback component?
View 1 RepliesI have an mp3 file that i dragged into a layer, which starts playing at the beginning of my movie.if i preview, i can hear it playing.
annoying problem is that if i stop or pause the preview, the music keeps playing and if i start it again, another instance of the audio track starts playing again so that they are playing at the same time.
Ive got a project with a fairly complex arrangement of menus and a narrated tutorial of sorts that is large (in terms of Mb) compared to the menus themselves. Since the tutorial is likely to be played only once, if at all, I don't want to load the asset unless needed. To do this I'm using the following code to load an external swf (the tutorial) and attach it to an mc container (mc_launch). A loader bar will be added later but for now it works, except: if the user navigates away from the tutorial (jumps to another frame in the menu timeline) the audio of the child attached to the mc_launch continues to play even though the instance of the mc_launch is no longer on stage. Shouldn't all the child objects of the container go away once the instance of the container is gone? If not, do I specifically have to execute a mc_launch.removeChild(loader) before navigating away from the instance of mc_launch?[code]...
View 5 Repliesi have a simple website i'm building. 4 sections/nav buttons. on the main homepage a video automatically starts playing, but when you click on another nav button which takes you to another frame in the site that displays another section - the video from the first homepage section is still playing.here's the code i'm using on the buttons that go from one section to the next:
Quote:
home.addEventListener(MouseEvent.MOUSE_DOWN, homeNav);
function homeNav(event:MouseEvent):void {
gotoAndPlay("home");
}
[code]....
what do i need to do so that the video stops playing when you go to another section from the homepage/section?
I've just posted a reply in the ActionScript3 Forum as someone else has had the same problem, but I can't find a solution so posting again here as it's taken me about 5 hours of getting nowhere and I'm sure this is really easy... have one frame on my time line called "theatre" and another called "Video" the buttons between the two work but the video continues to play in the background when I go back to the "theatre" frame on the same time line and I can't find a stop function that will work A button on my main page links to Video on the timeline with following AS3
btnVid.addEventListener(MouseEvent.CLICK, clickbtnVid);
function clickbtnVid(event:Event) :void {
gotoAndStop("Video");
[code]....
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...
I've agreed to helping a friend out to make a few changes to her website.
One of the things I need to do is make the music turn off when you click 'musicff'. It doesn't work at the minute and for the life of me I can't seem to figure it out. Below is the coding on one of the frames [code]...
1) I'm on the portfolio page, and I click a button to load a video.
2) Let's say I change my mind and press "back" button BEFORE the video has a chance to load completely.
3) I am back at the portfolio page. Everything looks okay BUT the video eventually loads. I can't get rid of it if I remain on the portfolio page.
i have a problem that i've already see that is pretty usual, the videoplayer that i have works fine but when i click in a button to go to another page the videoplayer doesn't stop,the audio continues playing even when i'm not on the videoplayer page.I've already found some solutions in the web but none of them worked,probably because i didn't put them in the right place
The code is a little long:
// ###############################// ############# CONSTANTS// ###############################
[code]........
How can I stop a scene from playing until I tell it so?
View 4 RepliesI am having a problem stopping external swf from playing. I am currently using FlashCS4 and publishing to Flash Player 10. I would really like to use the code
"loader.unloadAndStop();"
to stop the swf. I tried using it but I keep getting the following error:
1061: Call to a possibly undefined method unloadAndstop through a reference with static type flash.display:Loader.loader.unloadAndstop();
I read somewhere that since the swf files were published in Captivate (also using Flash player 10) I have to load the swf into a flash movieclip first then try the loader.unloadAndStop code.
fscommand("allowscale","false");
fscommand("showmenu","false");
//import flash.display.MovieClip;
var Xpos:Number = 220;var Ypos:Number = 105;
[Code] .....