2 Replies Latest reply on Jun 30, 2006 3:37 AM by Statikbuzz

    Bug with multiple Loader instances

    Statikbuzz Level 1
      I just noticed that if you have a loop that creates new loader instance, adds new listener to it and calls load on it fails to load multiple clips. Only the last load succeeds, others show only on Console as [UnloadSWF]. This did work on beta 3, something has changed.

      I posted some source demostrating this problem over here: http://jalava.blogspot.com/2006/06/as30-bugs-with-loader.html
        • 1. Re: Bug with multiple Loader instances
          ur_dtrain Level 1
          You are essentially overwriting the loader each time. You need to create a unique name for each. One warkaround is to use an array structure:

          ldrArray[clipnumber] = new Loader();
          ldrArray[clipnumber].load(url);
          • 2. Re: Bug with multiple Loader instances
            Statikbuzz Level 1
            I don't think so,

            actually I'm calling preload method in the underlaying object from lower from hierarchy.

            Here is a metasource on what I'm actually doing.

            ParentObject.preload():
            - for each child
            - add event listener to child
            - child.preload():
            - ldr = new Loader()
            - addEventListeners
            - loadClip
            - dispatch event to parent object
            - catch all events and fire another event when all child are done loading.

            And this did work on Beta 3, now it seems that I cannot call multiple Loader#load at the same time even if the instances are different as loading routine seems to have been moved to a static method or something.