我只是...试图让 SoundJS 播放声音。看起来文件永远不会加载,因为我的 handleLoad 函数永远不会被调用。有任何想法吗?
var audioPath = "snd/";
var sounds = [
{ id: "mySound", src: "gaia.mp3" }
];
function init( ) {
createjs.Sound.addEventListener( "fileload", handleLoad );
createjs.Sound.registerSounds( sounds, audioPath );
}
function handleLoad( event ) {
console.log( "Hello from handleLoad" );
}
init 运行时出现“creates.Sound.registerSounds 不是函数”错误。