Preloading all images in Flash/XML photo gallery

Hi,

I’m building a Flash photo gallery, and I came up with a solution using Flash and XML which is very, very similar to the one in this tutorial: http://www.kirupa.com/developer/mx2004/thumbnails.htm. The catch is, I’d like to preload all of the images listed in the XML array before showing the first picture. Simply using _framesloaded will obviously not work; I searched around a bit on Internet, but I haven’t yet found a solution. I thought I might try using an external script in PHP or javascript and use fscommand() in Flash, but I wanted to post here to see if anyone could think of another (simpler) way. Any ideas?

Thanks,
C

Forgot to mention in title, this is for FlashMX using ActionScript 1