Closed VadimRydenko closed 5 years ago
You're initializing a new Sound
in stopSound
function instead of referencing the existing Sound
object that is currently playing.
In playSound
, store a reference to your Sound
object, then use that reference in stopSound
to stop it.