4 Replies Latest reply on Mar 22, 2007 7:44 AM by kglad

    Clip loading order inversed???

    Nixy
      I have a linked clip in my library that is a thumbnail. Well the only thin inside is a code to load a thumnail jpg.
      Here is the situation. I use a for loop to add a seri of these linked clip displayed on the stage. All the same clip, at different pos _y and only the thumb path is pass to the clip as a parameter. The question is about the way the clip load. They display one after the other, but the load order is reversed. The last one added to the timeline is the first one ti load and display follow by the previous one and so on. If there is a loop of 10, the 10th clip load and 9, 8, 7...

      Why? Is that like Java LIFO concept. Last In First Out that flash manager it???

      Thanx for you help.

      *** I know I can set the reverse order and attache the last one on the stage in first and so on, but I want to understand the problem, not doign a workaround... ;-)
        • 1. Re: Clip loading order inversed???
          kglad Adobe Community Professional & MVP
          they should all start loading, close to ,simultaneously. when they finish is more dependent on the files sizes than the start order.

          did you test using the download simulation in the test environment or did you test online?
          • 2. Re: Clip loading order inversed???
            Greg Dove Level 4
            Its probably not relevant but if you use a "for (var aa in myArray) " style loop instead of the more usual "for (var aa=0;aa<myArray.length;aa++)" then it will appear to be reverse order. I know its more usual to use the second version when looping through an array... but if you use 'for ... in' to iterate over an array then it starts with the most recently added element.
            • 3. Re: Clip loading order inversed???
              Nixy Level 1
              Yes, may be they start to load to closely. There is many images, never big, just thumbnails. The size of each is approximately the same. I did the test online. Even if on the computer it could be different, the real test is online.

              May be I can use the "for in" like GWD said or simply start the for with the last item and then i--. Well i'll try it.
              Tanx both for your help

              Ho, also, thank's about the course of the "for in". I didn't know that it was working that way "Last item first", and it could be useful sometimes. I appreciate your help!
              • 4. Re: Clip loading order inversed???
                kglad Adobe Community Professional & MVP
                if you want them to load sequentially use preloader code or one of the listener methods of the moviecliploaderclass.