2 Replies Latest reply on Jan 13, 2007 6:25 AM by IwannaFlashU

    MovieClipLoader only loading first picture

    cinemaguy Level 1
      Well i feel retarded but I cannot figure out why this code is only loading the first picture from the array. Everything is loaded properly but it is only tracing out the first number of the array. Any ideas?
        • 1. Re: MovieClipLoader only loading first picture
          sly one Level 1
          Hard to tell without seeing how you create the xmlHref array. Have you tried tracing the array's contents from within the for loop? I would add a couple of traces in there and see if what you get is what you expect:
          • 2. MovieClipLoader only loading first picture
            IwannaFlashU Level 1
            erm........I see three things that raise my somewhat limited eyebrows:

            1. You define the onLoadInit function AFTER adding the listener to theLoader......don't know if that matters or not.

            2. Variables within functions are separate from variables outside of said functions, unless you pass them to the function during the call or use a pathing scheme.......so how does the "i" in your onLoadInit function equal the "i" in your for loop?

            3. Finally, in your for loop, you keep creating the SAME empty movie clip, with the SAME name and then load a picture into that movie clip. If I am reading that code right, what you should see (assuming the other two points are meaningless) is last picture loaded only, as pic1 will be replaced by pic2 which will be replaced by .... last pic.

            If you are seeing the first pic, then my guess is the problem is #2. If you are seeing the last pic, then the problem is #3.

            These are my guesses and I'm sticking to them! :p