# Weird preloader problem

**URL:** https://forum.kirupa.com/t/weird-preloader-problem/118801
**Category:** Uncategorized
**Created:** [August 9, 2004, 9:42am UTC](https://forum.kirupa.com/t/weird-preloader-problem/118801 "2004-08-09T09:42:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Sunbuster](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@Sunbuster](https://forum.kirupa.com/u/Sunbuster)
#### Post date: [August 9, 2004, 9:42am UTC](https://forum.kirupa.com/t/weird-preloader-problem/118801/1 "2004-08-09T09:42:39Z")

</div>

first of, hi to all! even though it’s the first time I post here, I’ve stopped counting the times I’ve had use of the info in these forums, so thank’s to all who contribute 🙂

second, yes I’ve checked through this forum numerous times in search for the answer, but I haven’t found it.

Third, my issue with a preloader. I simply can’t get it to run as I expect, even though all my logic says this is how it should work. If I use getFramesTotal and getFramesLoaded for doing my preload testing, the thing works. But if I replace those commands with getBytesTotal and getBytesLoaded, then it won’t work.

Don’t have the smartest code, I know, but atm. I don’t care, just want to get it working:

frame 2:

```auto
 _root.gameContainer.loadMovie(whatToLoad);

```

frame 3:

```auto
 totalBytes = _root.gameContainer.getBytesTotal(); 
totalFrames = _root.gameContainer._totalframes;
currentBytes = _root.gameContainer.getBytesLoaded();
framesLoaded = _root.gameContainer._framesloaded;
_root.gameLoaderText = Math.round((currentBytes/totalBytes)*100);
_root.gameLoadedW.text = _root.gameLoaderText;
_root.gameLoadedB.text = _root.gameLoaderText;

```

frame 4:

```auto
 
if (_root.gameContainer.getBytesLoaded() == _root.gameContainer.getBytesTotal()){
if (whatToLoad == "highscore.swf"){
_root.gameContainer.gotoAndPlay(1); 
}else{
_root.gameContainer.gotoAndStop(1); 
}
}else {
this.gotoAndPlay(3);
}

```

so any opinions/suggestions are more than welcome

---

<div class="post-metadata">

### Author: ![Sunbuster](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@Sunbuster](https://forum.kirupa.com/u/Sunbuster)
#### Post date: [August 9, 2004, 1:17pm UTC](https://forum.kirupa.com/t/weird-preloader-problem/118801/2 "2004-08-09T13:17:32Z")

</div>

never mind, found a solution 🙂 Seems you have to specifically stop the movieclip (gameContainer) from playing after initiating the load command, otherwise it will start playing as soon as enough of the clip is loaded. This solved the getBytesLoaded thingy also for some weird reason…
