Playing a song on screen initialize

In Screen1.initialize,
I am saying Player1.start

When I come back from screens 2 to screen1, I can hear multiple sets of the song
(everytime 1 song gets added)
How to avoid that?


Logic can be something like that to prevent multiple songs from playing: If any song is playing then stop that playing sound and then start playing another song

If you are developing a music player then you can read this guide :

You should post your blocks so that we can figure out what the actual problem is.

And please read this:

1 Like

There is only one song, which I start on Screen1.initialize

I was assuming song will start when Screen1 opens first time, but every time Screen1 is opened from Screen2, 1 more of same song gets added

I am not closing Screen1 or Screen2, is that my mistake

I open new screen simply like

do open another screen screenName - ScreenXYZ

can you send me aia file. I will look over it .

1 Like

I had player 1 on screen1 and also on screen2, I have rectified mistake by removing player 1 from screen2.

1 Like

2 posts were merged into an existing topic: Background music