If you want to be sure that all images play at least once before looping again:
1) you could push all of the URL's from your XML sheet into an array, so that each image is accounted for
2) then...