Looping animation

I'm trying to get some cloud images to scroll across the screen and reset when they go off-screen, starting the whole animation again. I have four cloud images that I want to float gently across.
Any help?

@stephen,

check for the cloud if it has gone off the screen by using

where N is the cloud number that you want to check for

1
2
3
4
5
6
cloudN:setReferencePoint(display.TopRightReferencePoint)
local xPoint = cloudN.x
if x<=0 then
 cloudN:setReferencePoint(display.TopLeftReferencePoint)
 cloudN.x = _W
end
views:1249 update:2011/10/22 17:28:16
corona forums © 2003-2011