On my App in the settings menu, I set 2 buttons to on or off a media file via player. Here are the blocks:
and this is a screenshot of settings menu:
They are working perfect. When I click the on button, the music begins and the backgroundcolor changes. The same is the off button.
But the problem is, if I open another screen and came back to main screen, I want to stop it automatically. But the music is still playing. When I open the settings menu, the buttons positions looks like the custom position as the image here at the beginning: Off. And although I press the off button, the music doesn't stop. And the funny thing is, when I press the on button, a second music is starting to play while the first music is still going on. What's wrong here???
This has to do with how you switch screens. Show the blocks and post the aia. Also post what exactly, how and when should happen. Should the music stop when the new screen is opened or when you return to the screen?
The aia file is very complex. I send you the blocks from main screen. If I change the screen, the music should keep playing, and its actually doing it. But if I return to the main screen, the music should stop. In the settings menu, I want to recall the music again through the on off buttons. When Screen1.initialize, do call Player1.stop doesn't work.
If you re-open the main screen, then you will have the sound from the Main Screen and the re-opened Main Screen.
Instead of the open another screen block you need to use the close screen block.
So, I read the tutorials about working with multiple screens. That was the main problem in my app. I decided to work with one screen using the vertical arrangements as virtual screens. This is very easier and not complicate. Thanks for your support.
It also interfears with the UI. With multiple screens, you can easily set an animation, but no animation(by using arrangements) also gives an awesome design.
You decide. I usually create my apps with mulyiple screens, but both techniques are good!