Loading external images upon entering the frame

I am putting together code for an XML image gallery and I want it to preload all the images when someone enters the scene that the gallery is on / instead of doing them individually when the corresponding thumbnails are clicked on. I am kind of confused on how to go about doing this. I am wondering (I’m pretty sure I’m wrong on this) does it automatically load in the gallery with this code:

xmlData.load("images.xml");

I’m assuming I need to do more.