Preloading a slideshow?

I am making a photography site and when the user clicks “slideshow” in the main navigation I want it to preload slideshow.swf and then load it into a emptyMC on the stage, but I also want it to preload the jpg’s that slideshow.swf will dynamically display as the user flips through the slideshow. So, im assuming that what i need to do is have the preloader load slideshow.swf and all the photos, but not display the photos yet. Can someone help me out with the actionscript for this?

I also want a frame to dynamically resize to fit each photo, but ill worry about that later.