if (wc == 1001 && wf == 1){
soundManager.play(‘sound1’);
}
if (wc == 1001 && wf== 2){
soundManager.play('sound2');
}
代码如上,但是当条件满足以上2个条件时,sound1和sound2会同时调用,怎么做才可以让sound1播放完毕后,再去调用sound2.急
ajax
------解决方案--------------------
var sounds1=soundManager.createSound({
id: 'sound1',
url: '',
autoPlay:false,
onfinish:function(){
if (wc == 1001 && wf== 2){
soundManager.play('sound2');
}
}
});
var sounds2=soundManager.createSound({
id: 'sound2',
url: '',
autoPlay:false
});
if (wc == 1001 && wf == 1){
soundManager.play('sound1');
}
------解决方案--------------------
soundmanager2类库没用过,自己看下他们的api,如果支持循环播放应该可以继续播放下一个的