Preloader using a movie?

Can’t fine any info on this, sorry.

How do you use a movie on a timeline as a preloader?

So a movie is placed on the stage and is played 1 - 100 frames like a preloader does.

Here’s the code I have now:

[AS]
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBarFill._width = getPercent100;
this.loadText = Math.round(getPercent
100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(7);
}

[/AS]

Thanks