Dynamic Movie + Preloader

I want to create a picture gallery which loads external JPEGs and has 4 thumbnails and Enlarged Picture of the thumbnails. Initially the Enlarged picture shows the picture of first thumbnail. Click on thumbnails loads the respective enlarged picture in enlarged picture movie. My question is how to attach preloader to Enlarged Picture, so that when Big Picture is loading it will show progress bar. How and where to attach the getbytesloaded and getbytestotal pieces.

Illustration code:
var BigPic = this.createEmptyMovieClip(“a”,0);
var EnlargedPic = BigPic.createEmptyMovieClip(“b”,0);
function ThumbnailCreation()
{
[INDENT]for (i=1 to 4)
{

Thumbnail.onPress=function()
{
EnlargedPic.loadMovie(“Pic.jpg”);

}
}
[/INDENT]}
How to attach the preoloader bar for the EnlargedPic movie.

thanks in advance.