2 Replies Latest reply on Aug 20, 2006 12:42 PM by

    loading different sized pictures into loader



      Hi all,

      I've got a problem....I've created a photo gallery in flash 8 using a loader component but I'm using photos of different sizes.So I had to size the loader to all possible photo sizes but then the pictures tend to load all over the place within the loader component!

      Anybody would know how to get the photos to load centered in the loader component or maybe another way like loading them into a movie clip?

      Cheers

      Greg
        • 1. Re: loading different sized pictures into loader
          Rothrock Level 5
          I've never used a loader component and in general stay away from all components.

          It is very easy to use the MovieClipLoader class to write your own loader. You can then put code in the onLoadInit event handler to handle the resizing/centering of your external files.

          The trick, if you are resizing and reusing the same movieclip to load into. Is to first reset the _xscale and _yscale to 100, before you try and measure the size of the clip and therefore figure out how much it needs to scale.

          Perhaps if you want to stick with the component there is a similar trick? I just don't know.

          If you want to use the MCL – a really good thing to learn in any event – post back. Of course you should read the help file first and then post back! :)
          1 person found this helpful
          • 2. Re: loading different sized pictures into loader
            thanx a lot, I'm only starting with flash and I though there should be a better way.