Hi
I use simple preloader

function loadNewPart(part){
host._visible=false;
   this.attachMovie("preloader", "preloader", 999, preloaderPos);
   host.loadMovie(part);
this.onEnterFrame=function() {
 var tLoaded, tBytes;
 tLoaded = this.host.getBytesLoaded();
 tBytes = this.host.getBytesTotal();
 if (isNaN(tBytes) || tBytes < 4) {
  return;
 }
  if (tLoaded / tBytes >= 1) {
    this.host.stop();
    delete this.onEnterFrame;
   this.preloader.removeMovieClip();
   _root.showNewPart();
   } else {
          this.host.stop();
   var percentLoaded = (tLoaded /tBytes);
   this.preloader.preloadBar._width = this.preloader.preloadBarBG._width *
percentLoaded;
  }

   }

}
but tLoaded always = tBytes and preloader bar does not works. Swf loads
without preloadbar just on blank screen. Because  the first check (if
(tLoaded / tBytes >= 1) is always true. How it can be possible? I am trying
to find a reason for some hours and can not. Any idea?
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to