Have you tried doing a trace() of both tLoaded and tBytes?  It might
help you figure out what's going on.

Also, why not just do `if(tLoaded >= tBytes)`?  It seems kind of
pointless to do a division there.

  -Andy

On 3/8/07, natalia Vikhtinskaya <[EMAIL PROTECTED]> wrote:
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?
_______________________________________________
[email protected]
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

_______________________________________________
[email protected]
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