Preloader

Hi I would like to add a simple preloader to my flash movie, basically i want a movie clip of an animation to play on one layer, and not move to the next frame until all of the flash movie has loaded.

Im using the following code:

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

But for some reason the movie loads, and then displays the preloader.
Making the loader useless as its only displayed after the movie has loaded.

Does anyone have a really basic code to make sure the movie loads before moving forward, but displaying a movieclip too.

I have looked around on the net, but all are either ifFrameLoaded, or preload bars.