preLoader PROBLEM!

Hi,

I just want to know why this did not spot after it LOADES.

In my time line I have 10 frames, and I want to stop in frame 5.

After it loads it gos to frame 10 and Stops Why??

this is a CODE!

loadedbytes=getBytesLoaded();
totalbytes=getBytesTotal();
loadedkbytes=Math.ceil (loadedbytes/1000);
totalkbytes=Math.ceil(totalbytes/1000);
if (loadedbytes == totalbytes) {
gotoAndStop(5);
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (this.loader) {
gotoAndStop (this.frame);
}

Thnx in your advance!
Gllanci