In addition to Ashot's answer and all the rest, you can set the onfinish function when creating sound, not only during playback, for example:
var demo2Sound = soundManager.createSound({ url: '../mpc/audio/CHINA_1.mp3', onfinish: function() { soundManager._writeDebug(this.id + ' finished playing'); } });
... and if you need to change the onfinish function after the sound is already playing, you can do it like this:
demo2Sound._onfinish = function(){
franer
source share