%xl(image.... ) # load the image, lets say 100 subimages
%var(i, inc);%var(i, inc) # new image every ~0.1s (or whatever the default is)
%xd(image, %var(i)) # disply the image
%?if(%var(i), =, 100)<%var(i, 0)> # reset at the end of the subimages