3 Replies Latest reply on Sep 26, 2006 4:58 AM by Peter Lorent

    Should I be loading from external files?

      Hi All,

      I am currently working on my companies new Flash promotional site and have a quick question regarding loading external movie clips.

      At present my site has a number of movie clips for the portfolio pages that contain JPEGs/GIFs of some of our previous work. I created a small preloader for each that loads the first image before pausing until the next one is loaded and so on, but you never see it as my preloader at the beginning of the main file loads everything before it starts. Should I be externally importing these onto the timeline instead? If so can I control them as if they were part of my Library as when moving from one portfolio section to another I actually animate the movie clips off the stage? I take it if I did import these the file size of my main file would reduce significantly too?

      If I was to import these externally what method should I be using? I've had a scan through my FlashMX bible but I'm starting to get quite confused!

      As always, any help is much appreciated.

        • 1. Re: Should I be loading from external files?
          Peter Lorent Level 2
          Well, I would load assets on demand. And you should use the MovieClipLoader Class to do so. Once loaded you can do everything you would normally do on the timeline. If you want to display details in text (or other images for that matter) with the projects, use xml and load the data with the XML Class.
          • 2. Re: Should I be loading from external files?
            CharlesNew Level 1
            Thanks for the reply.

            So how would I state which layer I want to place the clip on, and the scale/location of the clip? Would I also need to use the unload command too or could I just keep it loaded without impacting on anything?

            Sorry, this is probably something really simple but I'm not particularly confident in using the more complex ActionScript!
            • 3. Re: Should I be loading from external files?
              Peter Lorent Level 2
              You can't assign a layer when loading external assets. Instead you load in an existing - empty - movieclip (either already there or dynamically made) and use depths to layer the assets.
              Hit F1 and search for MovieClipLoader Class - enough examples and explanation there. After the image or swf has fully loaded you assign properties.
              Management of loaded assets depends on the situation. You can use movieclip.removeMovieClip() or keep assets loaded and set them to invisible and quite some other techniques. Start by investigating the MovieClipLoader Class.