1 Reply Latest reply on May 10, 2007 2:06 PM by Web_Maven

    Loading on-top of exisiting swf (then unloading previous swf)??

    kingmonkey Level 1

      I'm currently building a site with 1 main file, and 4 swfs loading into a Empty Movie container within the main file. An example of the code I'm using (on buttons) to do this is

      on (release) {
      loadMovie("Reels.swf", "_root.container");

      This works fine, but instead of just replacing the existing swf with the new one, I'm trying to create a transistion where the new loaded swf covers over the exisiting one. I have added a fade/wipe to the start of each external swf, but because they are all loading into the same movie container on the same level, I'm not getting the effect I'm after.
      I'm still learning AS, is it possible to load an external swf into the movie container on the next level (to the exisiting one), then after a short time unload the swf in the previous level? As I say, I in the process of learning flash/AS, so any advice is greatly received, even pointing in the direction of a tutorial to learn.

        • 1. Re: Loading on-top of exisiting swf (then unloading previous swf)??
          Web_Maven Level 1
          You want to use loadMoveNum which will allow you to load the SWF's into different levels. You want to be careful about using _root, if your other Sub-SWF's use _root in them they may not work correctly. _root will have your Sub-SWF's point to the main movie _root.

          You can also do this with multiple container
          loadMovie("Reels.swf", "_root.container");
          loadMovie("Reels.swf", "_root.container1");
          loadMovie("Reels.swf", "_root.container2");

          and make them play and make them visible when you need them.

          When you build the web site on your local computer this will happen fast but when you put it on a web server and have to download the content it takes longer. You may want to use the second option so all the content is loading in the background, otherwise you will need to use a preloader.

          Good luck;