rolling background

guys…

sorry to bother, already consulted all the guides to figure this out but they didn’t quite work for me. It’s about the trite issue of creating a scrolling background… only very simplified, it’s not an in-game screen, it’s just for an intro sequence: I’d like this background image

to simply scroll horizontally indefinitely. Any good soul willing to put down a few lines of code for me?

thanks a lot.

try to load 2 pictures of the same file into the device. one is loaded into the screen, while the other one ‘off’ the screen (put it on left or right, depends on which way you want to picture to scroll)

create a function to make transition for both of the picture, scrolling left/right. loop when the picture off screen already fill the screen, and the original one has moved out of screen.

local function scroll() transition.to(img1, {time = 100, y = //move toward left or right out of the screen}) transition.to(img2, {time = 100, y = //move toward left or right into the screen, onComplete = //loop the function}) end

hope this helps.

thanks a lot Jonathan!

I just finished applying this tutorial:

http://thatssopanda.com/corona-sdk-tutorials/creating-a-horizontal-scrolling-background-in-corona-sdk/

to my code and it worked well - mind the typos, i.e. “lt&” -

though thank you anyway for the help!

try to load 2 pictures of the same file into the device. one is loaded into the screen, while the other one ‘off’ the screen (put it on left or right, depends on which way you want to picture to scroll)

create a function to make transition for both of the picture, scrolling left/right. loop when the picture off screen already fill the screen, and the original one has moved out of screen.

local function scroll() transition.to(img1, {time = 100, y = //move toward left or right out of the screen}) transition.to(img2, {time = 100, y = //move toward left or right into the screen, onComplete = //loop the function}) end

hope this helps.

thanks a lot Jonathan!

I just finished applying this tutorial:

http://thatssopanda.com/corona-sdk-tutorials/creating-a-horizontal-scrolling-background-in-corona-sdk/

to my code and it worked well - mind the typos, i.e. “lt&” -

though thank you anyway for the help!