0 Replies Latest reply on Jan 25, 2008 5:28 PM by 3dGuy81

    Preloader issues...

    3dGuy81
      Hey guys!

      I'm new to this site and to the whole flash/scripting business. I finished a website using flash, and the final touch I need to add is a pre-loader.

      I used this tutorial to get me started:

      http://www.lukamaras.com/tutorials/p...preloader.html

      Now, at first I thought I incorrectly created the preloader. I then downloaded his pre-loading example, which works, and then tried preloading my *.swf instead of his. It produced the same problem that my code did! It wouldn't preload properly.

      The file I want to pre-load is about 5.2 megs. What's happening is, it starts to pre-load a small amount, and then jumps to the file I would like to have preloaded, and only most of it is missing. (menu buttons load etc., but no graphics loaded with it) My first assumption is that I am not specifying the proper amount of bytes or something in the code to be downloaded?

      So, if his pre-loader works, am I doing something wrong with my 5.2 meg swf? Do I have to export the swf with any particular settings applied to it?

      This is the code that is in the pre-loader, Action/Frame 1:


      siteLoader.loadMovie("MyHomePage4.swf");
      loadingBar._xscale = 1;
      loadingBar.onEnterFrame = function() {
      kBytesLoaded = this._parent.siteLoader.getBytesLoaded() / 1024;
      kBytesTotal = this._parent.siteLoader.getBytesTotal() / 1024;
      percentage = Math.round(kBytesLoaded/kBytesTotal*100);
      this._xscale = percentage;
      if (percentage == 99) {
      delete this.onEnterFrame;
      }
      };

      Thanks for any help guys, I really would love to finish this..