# Preloader not working

**URL:** <https://forum.kirupa.com/t/preloader-not-working/217783>\
**Category:** Uncategorized\
**Created:** [March 1, 2007, 8:43pm UTC](https://forum.kirupa.com/t/preloader-not-working/217783 "2007-03-01T20:43:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Navarone](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@Navarone](https://forum.kirupa.com/u/Navarone)\
**Post date:** [March 1, 2007, 8:43pm UTC](https://forum.kirupa.com/t/preloader-not-working/217783/1 "2007-03-01T20:43:58Z")

</div>

I am using this code to load my swf. If I test it locally using the download simulator the progress bar and text work correctly. But when I view it from the server, it doesn’t. Is there something I am missing.

here are the links if you want to see

[http://www.virtualhorizons.com/westfield\_web/culture\_loader.html](http://www.virtualhorizons.com/westfield_web/culture_loader.html)  
[http://www.virtualhorizons.com/westfield\_web/agribusiness\_loader.html](http://www.virtualhorizons.com/westfield_web/agribusiness_loader.html)

```auto

loadMovieNum("culture_history.swf", 1);
stop();
preloadI = setInterval(preloadF, 100);
function preloadF() {
 loaded = _level1.getBytesLoaded()+_level0.getBytesLoaded();
 total = _level1.getBytesTotal()+_level0.getBytesLoaded();
 if (loaded>=total) {
  clearInterval(preloadI);
  //do whatever. ur movies r loaded. 
 } else {
  percent = Math.round(loaded*100/total);
  movieReal.bar._xscale = percent;
  movieReal.p_text_mc.p_txt.text = percent;
 }
}

```
