Need some preloader help

I am trying to build a preloader that goes to whatever frame of a mc that the movie is loaded (well…that makes no sense). Lets say, the movie is 50% loaded, then the mc will goto and stop on frame 50. If anyone could point me in the right direction, that would be VERY helpful

bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
if (bytes_loaded == bytes_total) {
	mc.gotoAndStop(50);
}

So…I have to figure out some way to make it play if the ‘loaded’ is only half of the ‘total’…