Starting from the layout 1, when I go to Layout 2 and then return to Layout 1, the music stops.
Isn't that happenning to you? thanks
No it worked fine and clicked on sprite and music started and it went to layout 2 and music was still playing?
The music did restart after going back to layout 1 because you have that in your on start of layout events.
If you don't want it to restart remove that from your on start event and use a global variable to trigger it which will keep it looping if you want.