3 Replies Latest reply on Jun 19, 2009 8:58 AM by Rothrock

    onLoadInit and JPG


      I'm using a movieClipLoader object to load a series of jpgs and then resize them and _visible them once they have successfully loaded. And it "sorta" works. But not reliably. sometimes, maybe if there is a delay on the server and a slower download, the jpg will come in at the original size or not show at all.


      is there a way of doing this more reliably?

        • 1. Re: onLoadInit and JPG
          Rothrock Level 5

          Well the MovieClipLoader class is the way to do it more reliably. I've never not had it work.


          You mention server troubles. I'm wondering if an error is actually happing? Have you implemented an error event handler? That might explain the not loading bit.


          As for showing at the original size...I've never had the onLoadInit event not be able to access properties. A fairly common issue is that folks "reuse" a loading container that has already been scaled. In that case the first thing in the onLoadInit event handler should be to put the x and y scales back to 100 and then execute the resize code.


          Other than that I'm guessing it is a problem with your code somehow.

          • 2. Re: onLoadInit and JPG
            domconlon Level 1

            Thanks. Your reusing container comment sparked something. I was calling that many times but the target movie clip wasn't being passed correctly so it was trying to use the container incorrectly.


            thanks for the help

            • 3. Re: onLoadInit and JPG
              Rothrock Level 5

              Glad that worked out for you.