7 Replies Latest reply on May 25, 2006 4:08 PM by cowgan

    Flash actionscript pre load ( ADVANCE )

    cowgan
      Hi,

      I think this will be a complex problem and a challenging one to solve.

      Say I have a MENU.SWF and it has 30 scenes.
      At the end of MENU.SWF (which is scene 30) There will be a link to PART1.SWF , PART2.SWF, PART3.SWF

      Now the user can click any of PART1.SWF , PART2.SWF, PART3.SWF
      The user does not have to click it in order.

      Now in order to waive waiting or loading time when the user clicked on those links at the end of MENU.swf (which is scene 30)
      On MENU.SWF, I would like to preload 20% of each files ( PART1.SWF , PART2.SWF, PART3.SWF )
      So that when the user clicked on any of those files, the user don't have to wait until it loads the beginning of the file.

      Assuming PART1.SWF , PART2.SWF, PART3.SWF each has 30 MB file size, so preloading 20% of each will reduce the waiting time a lot.

      I don't know if there is a workaround for this issue.
      Any help or comments will be greatly appreciated.

      Thanks,
      cowgan
        • 1. Re: Flash actionscript pre load ( ADVANCE )
          Rothrock Level 5
          There is no way to do this. Once a file starts loading it either keeps going until it is done. Or in some cases it is stopped, but the partial file doesn't hang around just waiting to finish.

          I have no idea what you are doing, but 30 MB (90MB for three parts) is a ridiculous size for delivery over the web.

          Also there are well known difficulties with using scenes and Actionscript so be careful with your Menu. And what on earth could need 30 of them anyways?

          All in all I'm feeling this is not a totally well concieved project and that there may be better ways to get at what you are trying to accomplish. So what are you trying to do.
          • 2. Re: Flash actionscript pre load ( ADVANCE )
            cowgan Level 1
            Rothrock,

            I appreciate your feedback.

            PART1.SWF is roughly around 10 MB file size
            PART2.SWF is around 10 MB file size
            PART3.SWF is around 20 MB file size.

            They have big file sizes, because there are a lot of templates, and movies in it.

            So my concen for this project is:

            1. Is there any workaround to reduce SWF file when there are a lot of movies will be loaded into it?

            2. MENU.SWF should load some bytes from PART1.SWF , PART2.SWF, PART3.SWF so that the user does not have to wait for the preloader to load the beginning scene when he/she clicks on the link to PART1.SWF , PART2.SWF, PART3.SWF ?

            Thanks in advance for your feedback,

            Cowgan
            • 3. Re: Flash actionscript pre load ( ADVANCE )
              Rothrock Level 5
              Okay. In the realm of widespread broad-band access we are at least entering the realm of sanity. That being said, these are still quite large file sizes.

              1. The work around is what you are already doing – break things out and load them dynamically. This is better because it allows the Flash plug-in to better manage the memory. By " a lot of movies" do you mean video? That is the only think i can think of that would be bumping you up to files of this size. In that case leave them all external and play them back dynamically.

              2. Again scense are a touchy subject with actionscript. You might look into breaking up your Parts into subparts.
              • 4. Re: Flash actionscript pre load ( ADVANCE )
                cowgan Level 1
                Thanks for your prompt feedback Rothrock,

                So the main idea is to break the large file size into parts, in a sense it will divide the large file size so that it will not take a lot of time for the preloader to load the beginning scene of each SWF file.
                And also try to load the movie externally intead of embedding in it


                • 5. Re: Flash actionscript pre load ( ADVANCE )
                  Rothrock Level 5
                  Yup. Without knowing the exact project it is difficult to say exactly but that is the general idea. Break it up into as many small pieces as you can. This is something that requires quite a bit of planning and thought before you even begin the coding.

                  If you have some thoughts about the structure of the whole thing post them here and we can bounce around a few ideas.

                  For video instead of embedding it you can do dynamic "streaming" playback. Really good tutorials at gotoAndLearn.com for that.

                  If you have lots of clips/graphics to load – and are publishing for Flash 7 or highter – I would recommend looking at the MovieClipLoader. It has nice onLoadProgress and onLoadInit events that can help with the preloading of things. You still won't be able to do a partial preload though!
                  • 6. Re: Flash actionscript pre load ( ADVANCE )
                    cowgan Level 1
                    Thanks again for your feeback Rothrock,

                    So Actually is there any workaround to provide a smooth transition between MENU.SWF to either PART1.SWF or PART2.SWF or PART3.SWF ?
                    i.e. I don't want the users to see a preloader when they clicked on the link to either PART1.SWF or PART2.SWF or PART3.SWF

                    I am just thinking that I might use a cover page for each PART1.SWF or PART2.SWF or PART3.SWF
                    and make the cover page to wait for 5 seconds before it goes to the next scene.
                    That way the flash player will have some time to load some bytes.

                    • 7. Re: Flash actionscript pre load ( ADVANCE )
                      cowgan Level 1
                      I am also wondering if it is possible to preload say either PART1.SWF or PART2.SWF or PART3.SWF in the background of MENU1.SWF
                      i.e. while MENU1.SWF is still playing, I want the player to load PART1.SWF in hidden mode, but not playing PART1.SWF until the user click on the link to it.

                      Looks like this is getting interesting