[]js预加载声音报错

Laya.loader.load(slot_sound_res, Laya.Loader.SOUND, Handler.create(this, onSoundProgress, null, false));
//游戏资源加载进度函数
function onSoundProgress(pro) {
console.log("sound" + pro);
} 这样写哪里错了?
已邀请:

cuixueying

赞同来自:

你声音加载的格式写错
Laya.loader.load(slot_sound_res,Handler.create(this,onSoundComplete),Handler.create(this,onSoundProgress),Laya.Loader.SOUND,null,flase)
写代码的时候注意下接口的参数类型

222.png

 

vincent

赞同来自:

谢谢
 

要回复问题请先

商务合作
商务合作