Skip to main content
Known Participant
November 27, 2023
Question

How to make music play again when music stop

  • November 27, 2023
  • 1 reply
  • 356 views

I have used the coding action script SoundMixer.stopAll(); to stop my song when going to another frame but when I go back in the previous frame the song doesn't play. I have to be at the first frame again for the song to play. How do I want to make the coding only stop when it reaches the desired frame and return to the frame where there is a song, the song will play again. Actually, I am making a learning application that has three parts is learning, quizzes and games.

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    November 27, 2023

    create your sound (eg, sound1) and soundchannel (eg, sound1_c)

     

    then when you want your sound to 

     

    play:  sound1_c = sound1.play(); // may want to use non-default params

     

    stop: sound1_c.stop();

    Known Participant
    November 28, 2023

    if you can explain more simply because i did it but it was an error. This is for my final project .

     

    kglad
    Community Expert
    Community Expert
    November 28, 2023

    show the relevant code and what error?