2 Replies Latest reply on Sep 16, 2008 6:26 AM by kalibahlu

    Problem preloading images from XML

    kalibahlu Level 1
      I have a carousel-type menu that loads product and thumbnail images specified in an XML file, and I have a preloader that should load everything first before revealing the menu. My preloader checks to see if the total number of products are loaded before moving forward on the timeline, however, even after they're loaded into memory, they still take a long time to draw up. Is there a way to tell Flash to wait until everything that's loaded is drawn up on the screen before continuing? Thank you for your help in advance! I'll attach the preloader code that I'm using:

        • 1. Re: Problem preloading images from XML
          robdillon Most Valuable Participant
          How are you using getBytesLoaded? To test the whole movie's loading, the XML file loading, or each item specified in the XML? In any case, those loaded images won't be drawn to the stage until the frame that they are loaded onto is displayed.

          You could just take the images and place them on the stage to see if that frame will display quickly or if there is too much content to display as you like.
          • 2. Problem preloading images from XML
            kalibahlu Level 1
            Hi Rob, thank you for your reply. The images are already on the stage when the XML is loaded, and I just have a box covering the stage until after it's loaded. Well, it's supposed to wait until after it's loaded, anyway. As far as what getBytesLoaded is testing, from my understanding, it returns the number of bytes loaded out of the whole movie and everything loading into it, I don't think you can specifically the XML.

            I wish there was a way to test if it's still drawing up. I have the objects all being placed onstage in a for loop which doesn't give a "play();" command until after everything should be placed, but you know Flash, it goes ahead while it's still working on the last thing anyway :(