执行功能时,将从库中播放声音的ActionScript 3代码是什么?
最佳答案
soundClip = new Sound();
soundClip.load(new URLRequest("path"));
soundClip.addEventListener(Event.COMPLETE, soundLoaded);
soundClip.addEventListener(ProgressEvent.PROGRESS, soundLoading);
function soundLoaded(e:Event) {
soundClip.play();
}
function soundLoading(e:Event) {
//do something else
}
这就像一个电影剪辑。关于actionscript-3 - 如何通过AS3播放声音?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5427990/