How do I code an app that waits before something happens?

I'm making an app, that when you press a button, it plays a song. Not very complicated. But, while the song is playing, every 1 second or so, I want the background to change. How do I do that?

Run a clock timer, when the music starts, change the background.
Stop the clock when the music stops.

I need it to change every second. Does it do that, or is there maybe any way to make that?

Seems a bit excessive (1 sec), but you should be able to do it every second, as long as the background images aren't massive in size/resolution. Consider the likely screen sizes in use, and size your backgrounds accordingly.





I want to cycle between these, would that be fine?

Try it, see how it goes.


(image files in assets)

thank you so much i will try it now

It works! Thank you so much!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.