Announcement

Collapse
No announcement yet.

Toggling the Background Music On and Off

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Toggling the Background Music On and Off

    It is possible in AutoPlay Media Studio to have music playing in the background of your application.

    To allow the user to turn off this music if they wish:

    1. Create a button.
    2. On this button's On Click event, insert the following code:
    Code:
    Audio.TogglePlay(CHANNEL_BACKGROUND);
    This example assumes the background music in your application is playing in channel CHANNEL_BACKGROUND. When the user clicks the button, the background music will pause if it was playing, and play if it was paused.
Working...
X