Loading image files using xml

I’ve created a photo slide show and have given random transition effect using action script. But all the images i display are preloaded. how can i load one image after another according to the user input (next button) using xml.