Music - How to stop the sound

How do you stop the sound if a students puts in a long song to play on a screen? @baker

There’s a new command called stopSound(). It appears in the toolbox in freeplay app lab, but might not in some of the levels, since we have to go through each an add by hand. But you can see (from the screenshot) it’s pretty self explanatory.

1 Like

Thanks Baker! I passed this on to my students.

This post just saved my class from the sound not stopping! Thanks Baker! Marianne

Is there any extra documentation for stopsound()? When we try to access it (“See examples”) for stopsound(), we get a “the requested page was not found” error.

Thank you! Three files below

@juliechew I’ll take a look at what happened to the documentation and relink it. Thanks for letting us know!

Thanks Hannah! The command is pretty intuitive, but documentation will be helpful.

stopSound is not stopping the music. \onEvent(“walkingplay”, “click”, function(){
playSound(“Joji—Jackson-Wang—Walking-ft.-Swae-Lee—Major-Lazer-(Lyric-Video).mp3”, false);
onEvent(“walkingstop”, “click”, function(){

Can you include the share link from the program? It makes it easier to take a look at it that way.

My students are having the same problem. Did anyone ever find a solution to the sound not stopping with the command? It even continues after we reset the program. We can only get it to stop by refreshing the page.

1 Like

@wilsoeri1 Would you be willing to share a project that uses this feature? It would be helpful to see it in context!

I actually found an answer on a different thread after searching for a while yesterday. If you hit the extension arrow on the play sound, there is a drop down that says true or false. If you make it false it does not loop the sounds. Then adding a stop sound after that makes sure that it stops all sound. Thank you for trying to help!

The solution is seen in the image below.

Great! Thanks for the update.