NEWBIE: Preloader doesn't load into cache! Help

I have a little problem, I have been trying to load a .swf movie into my flash movie. Unfortunately, this movie is too large; therefore, I used a preloader. I tried this preloader below (I inserted a “gotoAndPlay(1);” on frame 2 and named frame 3 “start”)—>

totalBytes = Math.round(getBytesTotal()/1024);
loadedBytes = Math.round(getBytesLoaded()/1024);
percentDone = Math.round((loadedBytes/totalBytes)*100);
if (_root._framesloaded>=_root._totalframes) {
gotoAndPlay("start");
}

This code above works alone with the movie, and it does cache, but when the movie is loaded into another flash movie, the code doesn’t work. The entire movie just loads before anything shows up. I even tried changing “_root.” to Parent. It didn’t help either. Anyway, I discarded the code and tried the one below (I found on this website)—>

stop()
bar._width = 0
assessLoad = function (clip) {
var kbLoaded = Math.floor(clip.getBytesLoaded()/1024);
var kbTotal = Math.floor(clip.getBytesTotal()/1024);
percent = kbLoaded/kbTotal;
bar._xscale =percent*100
percent_txt.text = Math.floor(percent*100)+"%";
if ((kbLoaded == kbTotal) && kbTotal>1) {
clip.gotoAndStop(2)
clearInterval(myInterval);
}
};
myInterval = setInterval(assessload,50,this)

This second code works like a charm. It’s very user friendly. It works by using only frame 1 for the preloading sequence. The .swf movie preloaded and loaded in my flash movie just fine, but whenever I hit the button, it goes through the preloading sequence every time. I checked my cache, and It didn’t show up. Is there a way to make the second code above allow caching.

Interesting problem. Does this happen using all browsers?

For what reason have included && kbTotal > 1? Perhaps there is a nice reason but as far s I would tell you, you don’t need it. if(kbLoaded == kbTotal) should work fine, but you might want to see what happens by reversing the if statement to say
[AS]
if(kbLoaded != kbTotal){
assessLoad(this);
}else{
this.play();
}
[/AS]
C

Well, I give a try and see. Thanks