I'm loading and playing an AudioSprite with JSON which works fine. But when I try to listen for the end of the sound I get a type Error.
game.load.audiosprite('sfx', ["snd/animalSounds.mp3", "snd/animalSounds.ogg"], "snd/animalSounds.json",true);
fx = game.add.audioSprite('sfx');
fx.allowMultiple = true;
fx.play("intro");
fx.onStop.add(soundStopped ,this);
onloadphaser.js:70687TypeError: undefined is not an object (evaluating 'fx.onStop.add')
Can this be done using .onStop?