Scrolling background with more than two images

Does anybody have an example of a scrolling continuous background with more than two images?

I would also like to be able to pause the background, so handling this with transitions instead of using the system timer is my goal (unless someone can suggest a different solution).

Thanks. [import]uid: 102017 topic_id: 18615 reply_id: 318615[/import]

If you’re using a Runtime listener you can always remove the listener to pause then add it again to resume.

I have a tutorial on Techority for two images you could modify to allow for more with a bit of experimentation, if that helps.

Otherwise, hopefully someone who has used more than two images sees this thread and can pop up some sample code for you.

Peach :slight_smile: [import]uid: 52491 topic_id: 18615 reply_id: 71507[/import]

Thanks for the help, worked like a charm.

For some reason I always forget about removing runtime listeners.

Thanks, as always! [import]uid: 102017 topic_id: 18615 reply_id: 71626[/import]

No worries, glad you got it!

Peach :slight_smile: [import]uid: 52491 topic_id: 18615 reply_id: 71770[/import]

Thanks again for your help.

I have the images scrolling perfectly, but I am having trouble with the runtime listeners (here and elsewhere)

My code is highly modularized, and I am unsure of how to add and remove event listeners remotely.

Simply having the removal and addition of the even listener in functions outside of the initial function being called by main.lua does nothing but return an error.

Is there a way to handle this that you are aware of?

[import]uid: 102017 topic_id: 18615 reply_id: 72284[/import]

In the module where you add the listener to start it moving add a new function just to remove it.

Then from your main file you should be able to go failName.functionName()

Make sense?

Peach :slight_smile: [import]uid: 52491 topic_id: 18615 reply_id: 72331[/import]

I was able to get it working with your method, thanks!

I was trying to keep the additional functions out of the main function, which (of course) wouldn’t return anything. [import]uid: 102017 topic_id: 18615 reply_id: 72559[/import]

I just saw a glaring type in my post. failName should have been fileName - sorry about that. (It was pretty late at night here when I wrote that ;))

I’m glad it’s all sorted!

Peach :slight_smile: [import]uid: 52491 topic_id: 18615 reply_id: 72593[/import]

I have just realized that I am having an issue with the scrolling backgrounds.

There is a small flickering line between the seams of some of the backgrounds, and only some of the time. I have observed it closely enough to know that it doesn’t occur every time or even with consistant backgrounds.

I have checked my image sizes, and they are all identical.

Have you had any experience with this issue? [import]uid: 102017 topic_id: 18615 reply_id: 73105[/import]

What width are the images? Odd or even? If odd that may explain it.

Peach :slight_smile: [import]uid: 52491 topic_id: 18615 reply_id: 73145[/import]