Animated preloader?

is it possible to make a animated preloader. I know how to make one with a loading bar, and a percentage thing. But i was wondering if you could make one that played a movieClip poportionally to the amount of frames loaded.
I fooled around with it for a while but couldn’t get it right. for a 50 frame animation i came up with this:


bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loader._currentframe = getPercent*50
if (bytes_loaded == bytes_total) {
	this.gotoAndPlay(3);
}

It didn’t work. any ideas/tut’s on this?