dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Preloading Multiple SWFs into cache and Playing them Sequentially

  1. #1
    Junior Member
    Join Date
    Dec 2005
    Location
    Orchard Park, NY
    Posts
    9

    Preloading Multiple SWFs into cache and Playing them Sequentially

    Hello

    I've seen a lot of posts on this subject, and I promise I've tried endlessly to make sense of the solutions that other people have posted. But I cannot seem to get any code to work my my purposes, so I decided to post my own thread.

    I have a main parent Flash movie that I need to load 7 exteral SWFs into. Each of the SWFs is like its own scene in a longer movie. The final parent movie should play each external SWF movie sequentially so that it appears as one combined movie. I want to use a preloader for the first couple of loaded SWFs (maybe the first 2-3) so that the parent movie does not start playing until those movies are fully loaded. Then I want to continue to preload the rest of the external SWF files into the cache so that they are fully loaded by the time the parent movie gets to playing them. Does this explanation make sense?

    Basically, I have a long Flash animation that I decided to split up into several individual movies. I've using the parent movie to seamlessly string together my individual movies to give the appearance of cohesion. I know how to use the LoadMovie function to load the SWFs into empty movie clips. That's no problem. However, I'm having difficulty with the prelaoder aspect. I am optimizing the parent SWF for the web, and it's important that the video plays seamlessly, so I cannot put individual preloaders onto each external SWF. They have to preload at the beginning so that when each individual SWF is called, it's already loaded and no preloader is required.

    Can anyone please help me with this?? I'm working under kind of a tight deadline, and I tried to the best of my ability to solve the problem using comments from previous posts, but I have been unsuccessful. Thanks again for anyone's help.

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    http://board.flashkit.com/board/show...22#post4024322

    I strongly suggest you use the MovieClipLoader Class and loadClip() instead of the old loadMovie(), you'll have a lot more control, and lots of methods to help you acheive what you want.
    More info on the class in the livedocs (link in my footer)

    gparis

  3. #3
    Junior Member
    Join Date
    Dec 2005
    Location
    Orchard Park, NY
    Posts
    9
    gparis - thank you so much for writing back. Based on some research that I've done, it seems like your 100 percent right - the MovieClipLoader Class and loadClip() is the way to go.

    But I'm really struggling with applying this concept to my flash movie. is there any way you could write out some code for me that might help?

    I have a flash file called parent.fla that I want to load the following SWFs into:

    mc1.swf
    mc2.swf
    mc3.swf
    mc4.swf
    mc5.swf
    mc6.swf
    mc7.swf

    I want to preload mc1.swf, mc2.swf and mc3.swf before the parent movie starts playing (and I would like to include a progress bar to indicate loading status). Once those SWFs are preloaded, I would like them to start playing sequentially while the rest of the SWFs load in the background.

    I'm so clueless when it comes to using levels and some of the other advanced action scripting. Anything you could do to write out some sample code for me would incredibly helpful.

    Thank you so much.

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    The 1st link i posted has that exact code you're looking for. Read jAQUAN's answers.

    gparis

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