2 Replies Latest reply on May 25, 2007 7:29 AM by bandit_8

    Flash/XML Question

    bandit_8
      Hi,

      I'm currently working on an application where I am reading in pngs files, that are specified in an XML file. I have it reading in and storing all of the image names/paths appropriately, and then each one being put into a dynamically created movieClip..and then once the image has been loaded into the MC, it scales from 0 to a larger size... that works fine if I only have one image... but I want to be able to have more than one, and I want them all to load below each other, so that they are lined up in a vertical row. My problem right now is that the first picture loads, and then is quickly replaced by the 4th picture... I can't figure out how to get them to line up in a vertical row, and even stranger, I can't figure out why it skips pictures 2 & 3. To see what exactly what is happening, click here:
      http://www.kick-interactive.com/xml_ex/

      Just to summarize what I want, I want it so that picture 1 is in the top left, and then picture 2 is below it, picture 3 is below it, etc.

      I have attached a zip folder containing the FLA, images, & XML.

      Anyone have any ideas or guidance that they could provide me with? I would love any input at all. It seems to me like it is progressing through the code without having completed the functions. If you need any further information, please just let me know.

      Thanks!
      b.
        • 1. Re: Flash/XML Question
          cpgenius
          In the function where the mcs are being created you'd have to store a
          variable where the last one has been created then add the height of
          the mc being loaded to the _y so that it's properly aligned evenly (if
          you wanted it to line up like that).
          • 2. Re: Flash/XML Question
            bandit_8 Level 1
            quote:

            Originally posted by: cpgenius
            In the function where the mcs are being created you'd have to store a
            variable where the last one has been created then add the height of
            the mc being loaded to the _y so that it's properly aligned evenly (if
            you wanted it to line up like that).


            Hi cpgenius,

            Thanks for your idea...it's a good one.. I also noticed that in the line

            _root.createEmptyMovieClip("empty"+j,this.getNextDepth());

            I should be using _root. instead of this ....but unfortunately that still didn't solve the problem of images 2 and 3 not showing up... I'll work on implementing your changes to see if that at least separates 1 & 4.

            If you think of any other suggestions, they would very welcome.

            Thanks!
            b.