Stop all audio files


I have four canvases on the window and a dropdown menu with 59 values.

When mouse enters into a canvas, a different mp3 file plays. When mouse exits, it stops playing that sound. Each file is called explicitly to stop playing.

Is there a way to make all audio files stop playing with a single command such as AllSound.Stop

Thank you,


Each sound being a different object, you must act on each of them.

An easy way would be to have an array of your audio sounds. When a sound starts playing, you add it to the array.
When you want to stop playing them all, you loop thru the array and stop every item in it.