A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 33

Thread: Sequencing multiple flash movies

  1. #1
    Member
    Join Date
    Dec 2005
    Posts
    59

    Sequencing multiple flash movies

    Hello guys,

    I've got a sequesnce of 4 or 5 movies (non-interactive animations) that I want to play one after the other. They are too large to just upload to the library and throw on the time line - like 10MB-20MB each, the machine really struggles with this. Can I make a move that accesses them without them being embedded? Would it be possible to add a soundtrack that goes over all of them, ie, the do not have an individual sound track. I create one movie file that plays the others and adds the sound.

    Thank you.

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Put this script in your main movie:
    PHP Code:
    var myArray:Array = new Array ("movie1.swf""movie2.swf""anothermovie.swf");
    var 
    mc:MovieClip _root.createEmptyMovieClip ("mc"1);
    mc.loadMovie (myArray[0]);
    var 
    count:Number 0;
    timer setInterval (myFunction1000);
    function 
    myFunction ()
    {
        if (
    mc.movieEnd)
        {
            
    count++;
            
    mc.loadMovie (myArray[count]);
            
    mc.movieEnd false;
        }
        if (
    count >= (myArray.length 1))
        {
            
    clearInterval (timer);
        }

    In each of your child movies at the end put a variable movieEnd and set it to false.
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Member
    Join Date
    Dec 2005
    Posts
    59
    Thanks, but how are they found? I don't quite understand - does it automaticfally look at the route folder?

  4. #4
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    You mean the variable or what is found?
    - The right of the People to create Flash movies shall not be infringed. -

  5. #5
    Member
    Join Date
    Dec 2005
    Posts
    59
    WEll either - sorry I'm new to variables and stuff.

    ...I've made a pretty serious miscalculation - Flash does not like all this material, thought it would compress much smaller and then it would easily fit into the library. Not good - thanks for help.

  6. #6
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    In the first frame put

    movieEnd = true;

    in the last frame

    movieEnd = false;
    - The right of the People to create Flash movies shall not be infringed. -

  7. #7
    Member
    Join Date
    Dec 2005
    Posts
    59
    OK thanks

  8. #8
    Member
    Join Date
    Dec 2005
    Posts
    59
    Seems to keep repeating first film - yes have added the MovieEnd varible.

  9. #9
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Sorry my mistake has to be the other way round.

    In the first frame put

    movieEnd = false;

    in the last frame

    movieEnd = true;

    and play around with the timing here

    timer = setInterval (myFunction, 1000);

    choose smaller numbers, 10, 100.
    - The right of the People to create Flash movies shall not be infringed. -

  10. #10
    Member
    Join Date
    Dec 2005
    Posts
    59
    OK, as my files are all .swf files what I'm attempting to do is import them into the library, add a layer, add the actionscript then export it from the library - this should work? takes a long time to get them into the library..like hours. My machine's got 2GB RAM too.

  11. #11
    Member
    Join Date
    Dec 2005
    Posts
    59
    Man, still doesn't work - getting desperate here. Any other methods? flash8?

    Thankyou

  12. #12
    Member
    Join Date
    Dec 2005
    Posts
    59
    Ok guys to recap - got about 85MB of flash movies to play one after the other to make an animation, my computer can't take the straing of having them all in the one library. Options please????

  13. #13
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    You need to learn to make some tests when things don't work like trace actions. I made an example for you.
    Attached Files Attached Files
    - The right of the People to create Flash movies shall not be infringed. -

  14. #14
    Member
    Join Date
    Dec 2005
    Posts
    59
    Thanks man - I understand the example - and really appreciate your efforts.
    I'm not 100% sure what's up with mine. I'm exporting my movies from flash - maybe that's part of the problem, they're so big that I can't get them into the timeline to addd the movie commands.

    Just out of interest - are there other means?

  15. #15
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Make your movies smaller to fit the timeline.
    - The right of the People to create Flash movies shall not be infringed. -

  16. #16
    Member
    Join Date
    Dec 2005
    Posts
    59
    hahaha, cheers man. It's a 3d animation thing. if you're interested they're here:

    http://www.yousendit.com/transfer.ph...725E984EB6D341

    Or anyone else for that matter.

  17. #17
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    You need to at least give the username and password.

    Here is another solution, see attachment.
    Attached Files Attached Files
    • File Type: fla B.fla (42.5 KB, 19 views)
    - The right of the People to create Flash movies shall not be infringed. -

  18. #18
    Member
    Join Date
    Dec 2005
    Posts
    59
    Sent you login details.
    Last edited by JimH16; 01-26-2007 at 10:58 AM.

  19. #19
    Member
    Join Date
    Dec 2005
    Posts
    59
    you mean adding the stop bit in the movie? trouble is my movies are direct outputs out of 3DMAX, meaning that I can't easily put controls on their timeline, hoping to do something with a parent file that doesn't need to alter the 'pieces'.

  20. #20
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Here is another solution. You don't need anything in your MovieClip. On the main timeline put this script:

    PHP Code:
    this.onEnterFrame = function ()
    {
        if (
    mc._currentframe 40)
        {
            
    movieEnd false;
        }
        else
        {
            
    movieEnd true;
        }
    }; 
    You need to know only the number of frames in the Movieclip. This is for B movie I attached.
    - The right of the People to create Flash movies shall not be infringed. -

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