Update:
I have noticed that I can play the sounds in the onKeyDown event by
accessing the soundLoader directly:
onKeyDown: function(charCode) {
// These will trigger a dot on the key being played
if (charCode >= 49 && charCode <= 56) {
Tutorial4.soundLoader.get("c1").play({volume:15} );
// this.sounds[charCode - 49].play();
this.dots[charCode - 49] = true;
}
return false;
}
So, I'm beginning to think that the soundLoader.isReady() method is
returning true before the sounds are actually loaded:
if (Tutorial4.imageLoader.isReady() &&
Tutorial4.soundLoader.isReady()) {
this.destroy();
Tutorial4.run();
return;
}
and maybe that is why the array is unable to retrieve any sounds and
only contains null values.