0 Replies Latest reply on Oct 21, 2006 7:23 PM by rfkrocktk

    Complete XML & Movie preloader

    rfkrocktk Level 1
      Hey all,
      Again, mad props to NSurveyor and kglad for help with the last one about the math.ceil() functionality.

      I was now just wondering how to make a preloader that would preload everything necessary for the movie to play: including the .png and .jpg files that are the background and menu devices, but NOT the .jpg files that are not being used. (I'm trying to run a random background type thing, and it would be stupid to have flash load EVERY .jpg file while it only really has to load one at a time)
      Basically, I need a 'startup' preloader to load the files needed from the XML file, the one bg image that is being used, and the movie itself of course. I also need to code a preloader for each time the random background button is pushed which will display a loader for the new bg image.
      Here is the link to the ZIP file, everything being completely contained in that:

      Here is the preloader code I have on frame 1 of the movie:


      this.onEnterFrame = function() {
      var amount:Number = this.getBytesLoaded() / this.getBytesTotal() *100;
      loaderHolder.loader._yscale = amount;
      if(amount == 100) {
      delete this.onEnterFrame;

      I'm assuming that I have to export all of my xml data in frame one or two of the movie in order for it to be loaded by the preloader, but I'm not sure. Any help would be more than appreciated
      - TK