Weird preloader problem

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 :slight_smile:

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:

 _root.gameContainer.loadMovie(whatToLoad);

frame 3:

 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:

 
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

never mind, found a solution :slight_smile: 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…