3 Replies Latest reply on Apr 22, 2008 5:40 PM by Rothrock

    MovieClipLoader or loadMovie

    jl2000 Level 1
      Hi - This is a pretty big question because it's about the foundation swf into which everything else is shown. Below I have the hierarchy I'd like to use on this big rebuild. I'm trying to keep swfs with different purposes, elements and layouts separated instead of putting everything on one timeline and jumping from frame to frame.

      I'm totally confused with "createEmptyMovieClip" and "make an empty mc and put it on the stage" explanations. I feel like I need to get preloading feedback on the screen espeiclly when FLVs are involved. But this can't be right.

      What's the best way to do all this? Am I "over organized"?
      Should I use MovieClipLoader.loadClip or loadMovie(), to bring swfs onto the STAGE.swf? Is there a general rule I can follow about when to use which?

      TIA for someone talking me back off the ledge with some good pointers to solid technique.
      JL
        • 1. Re: MovieClipLoader or loadMovie
          Rothrock Level 5
          Organization is good. Breaking things up into smaller chunks is good. Really only you can say when you've got your content broken up into the chunks that make the most sense for yoru likely audience.

          So what is so confusing about createEmptyMovieClip? It means to create and empty movie clip. Nothing particularilty difficult there. You can then use that movieclip to be the contianer for your externally loaded content.

          If you need visual preloader feedback (and that is certainly a good idea) then you will have to have some. You only have to do what needs to be done. So I don't know what you mean by, "But this can't be right." Yes it is right, you do need visual feedback. I think anything that is going to take longer than 1 or 2 seconds needs some kind of indication that it is working.

          If you are publishing for Flash 7 or higher you should use the MovieClipLoader class because it has all the events (like onLoadProgress and onLoadInit) already built in and you can easily create what you need. If you are publishing for Flash 6 or earlier then you will need to use loadMovie and make your own preloaders.

          It will be a lot easier if you break it down into each little piece that needs to be worked on and post specific questions regarding just that piece.

          The first bit of advice I can offer you is that all external file paths will be relative to the html page (if you are using an html page) that contains the original start.swf. So plan your code, asset folders, etc. accordingly.
          • 2. Re: MovieClipLoader or loadMovie
            jl2000 Level 1
            Rothrock -
            Thanks for the advice. At least now I know I'm on a good track.
            I will be using many levels but the final deliverable will be both a Projector and HTML. I thought the paths would be the same, no?
            jl
            • 3. Re: MovieClipLoader or loadMovie
              Rothrock Level 5
              Do you mean "levels" or "_level"s? In Flash there are _levels that you can load content into. However I recommend against using them. I think they are more trouble than they are worth and there aren't very many methods for working with them.

              As for the paths, I think the answer is yes. With a projector all paths will be relative to the original projector and for HTML all paths are relative to the original HTML.

              So say all your English language stuff is in a folder called AssetsENG and your Spanish is in a folder called AssetsSP and both of those folders are in a folder called Assets -- along with STAGE.swf. Now when you are developing STAGE.swf you might want to have something like:

              switch(curLanguage){
              case "ENG":
              filePath="AssetsENG/topic_E1.swf"
              break;
              case "SP" :
              filePath="AssetsSP/topic_S1.swf"
              break
              }
              myMCL.loadClip(filePath,holderClip);

              Now in the testing that will work because the STAGE.swf is in the Asset folders -- the same directory that contains the AssetsENG and AssetsSP folders.

              But later, when you have loaded STAGE.swf into START.swf that same code won't work because the start of the path with now be STAGE.swf and there is no folder with the name AssetsENG at the same level as the START.swf.

              Good luck and post back with new questions as you work through it.