Play 2 movie clips in sequence

Hello everyone,
I am looking for a script that can let me do this:
If I click a button - 1 movie clip will play X number of frames, and then after it completes, a 2nd movie clip will play X number of frames. 
It is important that I can do this in one script in the button. 
Otherwise the easy way to do it would be add a command at the end of the 1st movie clip. Which I don't want to do because I am trying to create a conditional event thingy...
Any help/suggestions would be appreciated.
Thanks

btn.onRelease=function(){
mc1.play();
mc1.onEnterFrame=function(){
if(this._currentframe==this._totalframes){
this.stop();
delete this.onEnterFrame;
mc2.play();
mc2.onEnterFrame=function(){
if(this._currentframe==this._totalframes){
delete this.onEnterFrame;
this.stop();

Similar Messages

  • Movie Clips in sequence

    Hello everyone,
    Question, If you want to play serval movie clips in a row how
    do you set that up on the time line? Do you use one frame for each
    movie clip or do you need the same number of frams in the main
    timeline as there is in the movie clip.
    What I am trying to accomplish is to play 4 or 5 movie clips
    in sequence. want to build them individually for editing purposes
    in the future
    Thanks
    Vorean

    vorean wrote:
    > Hello everyone,
    >
    >
    > Question, If you want to play serval movie clips in a
    row how do you set that
    > up on the time line? Do you use one frame for each movie
    clip or do you need
    > the same number of frams in the main timeline as there
    is in the movie clip.
    >
    > What I am trying to accomplish is to play 4 or 5 movie
    clips in sequence. want
    > to build them individually for editing purposes in the
    future
    >
    you could have stop(); action in all these clips first frame.
    Than in the last frame of each clip
    _root.NextClipName.play();
    So the stop(): prevent them from running and last frame
    action
    kicks in next one to play, once done, another one and so
    on...
    Regards
    Urami
    Happy New Year guys - all the best there is in the 2006
    <urami>
    http://www.Flashfugitive.com
    </urami>
    <web junk free>
    http://www.firefox.com
    </web junk free>

  • Playing a Movie Clip within a Movie Clip on load

    Hi,
    I'm trying to play a Movie Clip animation that is within a Movie Clip after a button has been pressed in a different Movie Clip.
    The issue is that all Movie Clip animations are playing as soon as the SWF is loaded.
    I have a separate Main.as file that contains all of the coding except for the animation stops:
    package
              import flash.display.MovieClip;
              import flash.events.MouseEvent;
              public class Main extends MovieClip
              var title1:Title1;
              var scene1:Scene1;
              var scene2:Scene2;
              var scene3:Scene3;
              var scene4:Scene4;
              var scene5:Scene5;
              var scene6:Scene6;
              var scene7:Scene7;
              var scene8:Scene8;
              var scene9:Scene9;
              var scene10:Scene10;
              public function Main()
                        title1 = new Title1();
                        scene1 = new Scene1();
                        scene2 = new Scene2();
                        scene3 = new Scene3();
                        scene4 = new Scene4();
                        scene5 = new Scene5();
                        scene6 = new Scene6();
                        scene7 = new Scene7();
                        scene8 = new Scene8();
                        scene9 = new Scene9();
                        scene10 = new Scene10();
                        addChild(title1);
                        title1.buttonStart.addEventListener(MouseEvent.CLICK,onButtonStartClick);
                        scene1.buttonWalkOutside.addEventListener(MouseEvent.CLICK,onButtonWalkOutsideC lick);
              //title
              function onButtonStartClick(event:MouseEvent):void
                        addChild(scene1);
                        removeChild(title1);
                        Scene1(parent).gotoAndPlay("frame1")
              //scene1
              function onButtonWalkOutsideClick(event:MouseEvent):void
                        addChild(scene2);
                        removeChild(scene1);
    So right now, I'm getting this error:
    TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Stage@46534041 to Scene1.
              at Main/onButtonStartClick()
    Any help is greatly appreciated... I've been grinding at this all night.

    I had been trying a bunch of different methods after searching for clues on Google, so it probably doesn't make sense with the parent.
    I replaced the code with what you wrote, and I am given this error now:
    Main.as, Line 44
    1120: Access of undefined property scene1Text1.
    Is there somewhere I have to declare scene1Text1 in Main.as?

  • Playing different Movie Clips onRollover?

    I have several buttons that I would like to play different
    movie clips
    onrollover on the stage. So if button 1 is rolled over it
    plays a clip
    in the lower right corner and when rolled off it stops and if
    button 2
    is rolled over it does the same.
    How is this done?
    Thanks!

    This is the code I am currently using to play and stop a
    movieclip:
    myPlay_btn.addEventListener(MouseEvent.CLICK, playMc);
    myStop_btn.addEventListener(MouseEvent.CLICK, stopMc);
    function playMc(e:MouseEvent):void{
    my_mc.play();
    function stopMc(e:MouseEvent):void{
    my_mc.stop();
    1. How do I drag my movie clips onto the stage, but not have
    them
    display until the button is rolled over?
    2. Would this code just be applied for each button and
    modified from
    CLICK to OnRollover?
    Thanks!!!!
    kglad wrote:
    > assign a rollover listener to button 1 and in its
    listener function apply the play() method to your right corner
    movieclip. likewise for button 2.

  • Play a Movie Clip on a frame In Main SWF from a button, within 2 MovieClips

    I’m using AS2, Flash 8
    I have a frame on my main Timeline Called “Gallery” within this frame I have 2 movie clips, which I need to work together:
    One is called:
    Gall_Lge_1
    Which contains 37 frames.
    Each frame has a different movie – basically 37 different photos which pop up on each frame.
    (MC’s named Lge_1, Lge_2, Lge_3 etc)
    The second Movie Clip I have on here is called:
    gall_strip_mc
    Which contains a movie clip called strip1 , (which is set to scroll its contents controlled by buttons on ”Gallery”- which works) inside that is a movie clip called strip_all , and contains one frame with 37 buttons/photo thumbnails, (Buttons named btn1, btn2, btn3 etc which I require to link each individual button to the corresponding photo/frame in Gall_Lge_1  …
    So,
    btn1 will go to and play Lge_1(Frame 1 of Gall_Lge_1)
    btn2 will go to and play Lge_2(Frame 2 of Gall_Lge_1)
    I’m stuck and can’t get it to work..
    Here is the site – under ‘Gallery’ so you can see what I’m trying to achieve
    http://www.blueshelldesign.com.au/draft/
    (I’ve placed in Back and Next buttons next to ‘Gall_Lge_1’ so you can see how its suppose to look when the thumbnails from ‘gall_strip_mc’ are clicked)

    First, you do not use quotes when you are specifying a frame number, so try changing that first.  The only time you use quotes for that argument is for frame label strings.
    If it still won't play, are you sure that the button is coded properly and executes the function when clicked?  You should put a trace in the function to make sure.  Also, you could try using _root instead of _level0... I forget the difference, if any, but _root will definitely get you to the main timeline.
    btn2.onRelease = function() {
         trace("btn2 clicked");
        _root.Gall_Lge_1.gotoAndPlay(2);

  • Playing a movie clip in a simgle frame

    I'm making a flash gallery of several different animations,
    each being in one movie clip. I was wondering if there's a way to
    make a whole, say, 1000 frame movie clip play in a single frame on
    the main timelime, and how it would be done. (assuming that the
    main timeline frame has the actionscript to make the movie stop)
    I'm kinda new to actionscript and all, even though I've been
    working with flash for a while, so it would be a real big help for
    this project and future ones.
    -EDIT-
    I'm using AS2 for this project.

    It helps to realize that even the main timeline is a
    MovieClip instance.
    MovieClips play independently of one another, and can be
    nested. So if you
    just take your 1000 frame clip and place it on a frame (any
    frame will do)
    it will play - so long as the play head of the parent clip is
    on that frame.
    And you said you have a stop(); on the main timeline, so I
    assume it is. So,
    like kglad said, just put the clip on stage...
    Dave -
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Play internal movie clip at target

    This seems fairly simple, but i can't get it to work.
    I want to play a movieclip from the library when a button is
    clicked. But the LoadMovie is for SWF. The only way I can get it to
    work is have the button click cause - goto frame, which has the
    movie clip. But this gets complicated with various clips. Working
    in Flash 7-8.
    Thank you

    on the last frame of your movieclip attach:
    stop();
    this.dispatchEvent(new Event("finished"));
    right click your movieclip in the library, click linkage, tick export for actionscript and assign a class (eg, Starmove).
    you can then use:
    var minTime:uint = 1000;
    var maxTime:uint = 3000;
    var timer:Timer=new Timer(timeF(),0);
    timer.addEventListener(TimerEvent.TIMER,starF);
    timer.start();
    function starF(e:TimerEvent){
    var star:Starmove=new Starmove();
    addChild(star);
    star.x = Math.floor(Math.random()(stage.stageWidth-star.width));  // these two will probably need adjustment
    star.y = Math.floor(Math.random()(stage.stageHeight-star.height)); // ditto
    star.addEventListener("finished",removeStarF);
    timer.delay = timeF();
    function removeStarF(e:Event){
    removeChild(e.currentTarget);
    e.currentTarget.removeEventListener("finished",removeStarF);
    e.currentTarget=null;
    function timeF():uint{
    return minTime+Math.floor(Math.random()*(maxTime-minTime));

  • Rollover buttons that play a movie clip.

    Hello,
       I am new to Flash and I am trying to accomplish a simulation such as this example, http://www.its-about-time.com/investinesart/coalplantvirtualtour.swf. I have all of my movie clips done, but how do I tell a rollover button to play a specific movie clip? I also want to have all the movie clips to play simultaneously via a rollover button as shown in the example. I've attached a captured image of my timeline, if that helps. I've tried everything so far, but nothing is working! What is the simplest way of doing this?
    I have this inside one of the movie clips (mc_2) in a seperate layer under - (actions)
    RO_btn.onRollover = function(){
    mc_2.play();
    On the main timeline I have an actions layer with this:
    stop();
    Thinking that this may stop all of my movie clips but it doesn't.
    Should I make an actions layer in each movie clip with this syntax huh? stop();?
    I'm frustrated!!
    Thanks, if you can help!
    MG

    Hi,
    I have made something that you are looking for.
    It will be of help to you.
    basically you will have to create a few movie clips namely:
    2 buttons: (name them a_btn, b_btn, c_btn, d_btn, e_btn)
    3 movie clips (I am taking example image1_mc, image2_mc, image3_mc)
    in each of these movieclips.place 2 frames and on second frame put your movieclip(one in one).on both the frames put stop()
    now click on a_btn and write this script
    on (rollOver) {
    _root.image1_mc.gotoAndPlay(2);
    _root.image2_mc.gotoAndPlay(2);
    _root.image3_mc.gotoAndPlay(2);
    on (rollOut) {
        _root.image1_mc.gotoAndPlay(1);
        _root.image2_mc.gotoAndPlay(1);
        _root.image3_mc.gotoAndPlay(1);
    with this all 3 animations will work simultaneously. if you need to run any one of the movieclips at a time the you can address that mc in particular
    .Say if you want only 1 mc to move at a time then put this on  btn 2
    on (rollOver) {
    _root.image1_mc.gotoAndPlay(2);
    on (rollOut) {
        _root.image1_mc.gotoAndPlay(1);
    .Dont forget to give proper instance names to movieclips.(they are in properties panel.)
    Cheers!

  • How to stop , play nested movie clips....

    Hi all,
    I'm calling a swf file in a container_mc, which is in
    another swf file(Interface), by loadMovie() method. The Major
    problem I've stucked with is that in the interface I'm having a
    Play/Pause Button, which is not stopping the nested movieclips of
    the external swf file which is loaded in the container_mc
    movieclip.
    The other major issue is that I'm not able to add a
    progressbar(sliderbar) which runs according to the animation, to
    this interface. Please help ASAP

    I have a similiar situation however the container_mc has me
    puzzled, I'm not sure what that is - perhaps you can answer my
    question:
    I have a master swf called index.swf. The index.swf has a
    main tool bar of buttons which load frames; each frame is named to
    coincide with the main bar button (i.e. genInfo, setup,
    mainentance, etc). This works perfectly. My problem is with Movie
    Clips.
    Each frame has a sidebar which loads external swfs (i.e.
    genInfo.swf) - each external swf is made up of a series of Movie
    Clips which run in succession along the timeline; each Movie Clip
    belongs within its own frame (i.e. MCseg1 is in frame seg1; MCseg2
    is in frame seg2, etc).
    I need to pause and play each individual Movie Clip at will;
    I have built two buttons (pauseBtn and playBtn) into a Movie Clip
    called MCpausePlay. The first frame of MCpausePlay contains the
    pauseBtn; this frame is coded with the global "stop();" In order to
    move to frame(2) which contains the playBtn, the pauseBtn is coded
    with -
    on(release) {
    gotoAndPlay(2);
    The playBtn is coded:
    on(release) {
    gotoAndPlay(1);
    When clicked, the MCpausePlay moves from pause to play.
    That's all I have been able to get this to do.
    How do I code MCpausePlay to pause and then play each
    individual Movie Clip? (How do I get a Movie Clip to control other
    Movie Clips?). Should I code the Movie Clip, the frames within the
    Movie Clip, or each individual button within the Movie Clip? And,
    does this MCpausePlay belong on the Index.swf file, or should it be
    on each external swf? Or perhaps built in to every Movie Clip? I
    have tried all and have not had any success.

  • Playing any movie clip or youtube crashes computer, problem has only been happening for 6 months, what has been changed?

    running Windows XP 3 newish computer with lots of memory and hard drive space. Used to be fine, could play any clip or movie then suddenly about 6 months ago it started crashing when any movie clip played. I believe its an update in Firefox that caused the problem as it started happening after an UPDATE automatically loaded. Have been trying to resolve but noone I ask for help from responds including Mozilla.

    running Windows XP 3 newish computer with lots of memory and hard drive space. Used to be fine, could play any clip or movie then suddenly about 6 months ago it started crashing when any movie clip played. I believe its an update in Firefox that caused the problem as it started happening after an UPDATE automatically loaded. Have been trying to resolve but noone I ask for help from responds including Mozilla.

  • Stopping and Playing some movie clips?

    I have a problem with some AS3 code and i don't understand why.. my code looks like this:
    stop();
    halt.addEventListener(MouseEvent.CLICK, stopplaying);
    function stopplaying(event:MouseEvent):void {
    MovieClip(root).stop();
    MovieClip(root).gun.stop();
    MovieClip(root).gun.gt1.stop();
    MovieClip(root).gun.gt2.stop();
    MovieClip(root).gun.gt3.stop();
    MovieClip(root).gun.gt4.stop();
    MovieClip(root).gun.gt5.stop();
    MovieClip(root).gun.gt6.stop();
    gotoAndStop(1);
    That code is set to listen to a pause button to pause all movieclips when pressed but the last 2 rows "MovieClip(root).gun.gt5.stop();
    MovieClip(root).gun.gt6.stop();" doesn't work and gives me this output:
    TypeError: Error # 1010: A term is undefined and has no properties. third_fla at::ppBtn_20/startplaying ()
    But there shouldn't be a problem with this, cause the movieclips are the same as the others and has an instance name of gt5 and gt6 just like the other movie clips, and the code is obviously the same?

    Try tracing the different objects on those lines and see if they are recognized.  It may point to a misnaming or object absence.
    function startplaying(event:MouseEvent):void {
    MovieClip(root).play();
    MovieClip(root).gun.play();
    MovieClip(root).gun.gt1.play();
    MovieClip(root).gun.gt2.play();
    MovieClip(root).gun.gt3.play();
    MovieClip(root).gun.gt4.play();
    trace(MovieClip(root).gun.gt5, MovieClip(root).gun.gt6);
    MovieClip(root).gun.gt5.play();
    MovieClip(root).gun.gt6.play();
    gotoAndStop(2);

  • Playing a Movie Clip onClick

    I created a movie clip and I want to place it on the stage on
    frame one
    and place a button on a different layer on frame 1. onClick I
    want the
    button to play the movieclip and I want another button to
    stop the
    movieclip onClick.
    What is the AS3 to do this?
    thanks!!!

    do you know any actionscript3? if not, you should read the
    introduction to as3 in the help files. if yes, show the code you've
    tried.

  • Play multiple movie clips - with sound

    Hello Forum members,
    I am a total new comer in terms of flash and action script,
    self-educated and Adobe forum and internet educated. I can now
    click a button and stop and start a movie clip, use attachMovie,
    and even mute sound in a movie clip (not video). I am currently
    using Flash 8, and waiting for CS3 (downloaded a trial, and like it
    better than Flash 8).
    Enough history - now to my question - I have an application
    that had 3 scenes. I read in some Adobe article
    "Flash Best Practices" that it was not a good idea to use
    scenes in an application. I converted my Scene 2 and Scene 3 into
    movie clips.
    I figured I could either put each movie clip on a separate
    layer in my timeline (mc_scene2, mc_scene3)
    and play them, one after the other (did not quite work, more
    later). Or...
    copy the timelines from the scenes, and add those frames to
    my Scene 1, making a application with both scenes staggered one
    after the other in the main timeline. Or...
    Keep Scene 1 and at the end of scene 1,
    attacheMovie("mc_scene2", etc) and when scene 2 was done play and
    or attach the final movie clip (mc_scene3).
    I could not figure out how to tell when mc_scene2 was done
    using the attacheMovie method, so I could then attach mc_scene3,
    etc.
    How would I be able to tell when one attached or loaded movie
    clip is finished, and then start the next one?
    Or what is the suggested way to use actionscript to load a
    movie, play it, and when the clip is done, load and play the next,
    etc.
    Thanks for a good forum,
    eholz1

    Hello Again - I guess there is much that I do not understand.
    I followed the tip above - or so I thought.
    I have "buttons" on my movie clips that play the clip when
    clicked.
    I have placed stop actions in frame 1 of each movie clip.
    I tried placing mc_scene2 and mc_scene3 on their own layer
    in the timeline,
    and put the code above in my actions layer (Scene 1).
    it seems that nothing really works - the _visible property
    seems not to work,
    etc - I must be doing something wrong. What layer should the
    two mc's be
    placed?
    Thanks for the info
    Eholz1

  • Dreamweaver CS4 How to play a movie clip by clicking an image

    Hi
    Can anyone recommend a DW Behaviour, Widget or simple piece of Javascript coding that would allow me to start (or start and stop) a movie clip by clicking an image.
    I have a web page created in DW CS4 which has 4 FLV video clips and I would like visitors to be able to start their clip of choice by clicking a small still from each movie stacked at the right side of the page.
    I've seen this done on many sites but don't know how complex it would be.
    Any help / advice much appreciated.
    Thanks
    George

    Hi Ned, thanks for the response;
    1.Yes I named the instance.
    2.I  don't beleive so. I started from the library creating a new symbol, added the graphics, added the key frames, then created the tween. Then I dragged the symbol onto the main stage and named the instance. So I don't think there is a movie clip inside an mc.
    Here is the main timline:
    Here is the mc timeline:
    Here is what I'm trying to do:
    stop();
    blk1._visible = false;
    blk2._visible = false;
    blk3._visible = false;
    ppk1._visible = false;
    ppk2._visible = false;
    ppk3._visible = false;
    storeCartons = new Array();
    storeCartons = [blk1, blk2, blk3, ppk1, ppk2, ppk3];
    startButton.onRelease = function() {
        myNumber = Math.floor(Math.random()*storeCartons.length);
        trace("myNumber "+myNumber);
        activeCarton = storeCartons[myNumber];
        activeCarton._visible = true;
              activeCarton.play();

  • How to play a movie clip with a tween animation

    I created a movie clip symbol with a tween animation and created an instance of it on the main stage. The animation is in the movie clip timeline, not on the main timeline. I cannot get the mc to play using mc.play() or mc.gotoAndPlay.  What am I missing??

    Hi Ned, thanks for the response;
    1.Yes I named the instance.
    2.I  don't beleive so. I started from the library creating a new symbol, added the graphics, added the key frames, then created the tween. Then I dragged the symbol onto the main stage and named the instance. So I don't think there is a movie clip inside an mc.
    Here is the main timline:
    Here is the mc timeline:
    Here is what I'm trying to do:
    stop();
    blk1._visible = false;
    blk2._visible = false;
    blk3._visible = false;
    ppk1._visible = false;
    ppk2._visible = false;
    ppk3._visible = false;
    storeCartons = new Array();
    storeCartons = [blk1, blk2, blk3, ppk1, ppk2, ppk3];
    startButton.onRelease = function() {
        myNumber = Math.floor(Math.random()*storeCartons.length);
        trace("myNumber "+myNumber);
        activeCarton = storeCartons[myNumber];
        activeCarton._visible = true;
              activeCarton.play();

Maybe you are looking for

  • Can you password protect pages folders

    When you create a folder in pages, can you password protect the folder, or it only that documents can have a password?

  • Oracle Grid Data Collection Stopped

    Hi Everyone, My Environment details: Oracle Grid 10g 10.2.0.5.0 Oracle Database 10g 10.2.0.4.0 OS -Redhat Linux 5.4 x86_64 Today i tried to take the awr from Grid console for one of my database but there are no recent snapshot available and the data

  • Solaris 10 connection to the internet

    Not sure if this is the same question as the post below (http://forum.java.sun.com/thread.jspa?threadID=5235282&tstart=0) But i thought i would ask anyway. I need to connect to the internet on a sun ultra 10 running solaris 10. The broadband box is a

  • Corrupt lrcat AND backups! Any ideas how to retrieve/repair them?

    Hello, I've painted myself into a corner but hope someone has ideas on how to try to retrieve a corrupt lrcat file. My lrcat file AND its backup are BOTH corrupt, and will not open. They are visible. I have an iMac, OS 10.6, LR 3.3, just upgraded to

  • Won't let me import

    On my main computer with iTunes my internet connection isn't working so I came up with an idea to get more songs. I downloaded them on my one computer and burnt them onto a cd. Then I put it in my other comp to burn it but it won't let me. Instead of