A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Movie sequencing... how?

  1. #1
    Pillow Daddy m_andrews808's Avatar
    Join Date
    May 2001
    Location
    London England
    Posts
    924
    Hi

    I am trying to make a movie sequencer that automatically loads the next movie in a list after the last has finished playing. To do this I have a two frame loop running on the base movie that contains this code:

    Frame1:
    if (_level1.__currentframe == _level1.totalframes) {
    gotoAndPlay("NextMovie");
    }

    Frame2:
    gotoAndPlay("Frame1");

    At NextMovie, the next movie in the list is loaded.
    The problem is that the loop doesn't seem to be looping round and the first movie in the list just loops round and round. I made a working version of this program that requires a line of code to be added to each of the movies in the list, but want to make one that will sequence any movie.

    Maybe someone out there knows where I am going wrong. Is there a problem with the approach I have chosen, or is it in the code I have used? HELP!

  2. #2
    Pillow Daddy m_andrews808's Avatar
    Join Date
    May 2001
    Location
    London England
    Posts
    924
    P.S. I know I forgot to put a '_' before totalframes in my request

  3. #3
    Junior Member
    Join Date
    Jan 2001
    Posts
    24

    well there are a bunch of way to do this

    Hey here you go, one way of doing it....

    frame 1

    _root.movie1loaded = "no";
    _root.movie2loaded = "no";
    _root.movie3loaded = "no";
    etc.....
    _root.allLoaded = "no";
    loadmovie (movie1.swf,1);

    function loadCheck () {
    if (_root.movie1loaded == "yes" && _root.movie2loaded == "yes" && _root.movie3loaded == "yes" ..addmore if you want ) {
    enter your play command for the first movie or what you want once they are all loaded.
    } else {
    gotoAndPlay (2);
    }
    }
    function loadNext () {
    if (_root.movie1loaded == "yes") {
    loadmovie (movie2.swf, 2)
    } else if (_root.movie2loaded == "yes") {
    loadmovie (movie3.swf, 3)
    }else if (_root.movie1loaded == "yes") {
    loadmovie (movie4.swf, 4)
    }
    loadCheck ();
    }

    Frame2
    loadNext ();

    Frame 3
    loadCheck ();
    -------------

    Now what you will do is put in each one of the movies you are loading the preload info and set eachone so that:
    ***movie1.swf***
    frame2
    if (_root.__currentframe == _root.totalframes) {
    _level0.movie1loaded = "yes";
    add controller so it doesnt play or plays when complete
    } else {
    gotoAndPlay (1);
    }

    so what you have done is created a relay for your loading movies and a simple check for the index. There are more control in you can do but this will give you the ground work for the load..if you want play controls so it doesnt start playing or what not...or preloading this etc. email me, ill help you out.

    ubermench2001@yahoo.com
    Ben Schmidtke
    Macromedia Training Instructor/Developer











Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center