Actionscript 3 如何通过AS3播放声音?
什么是ActionScript 3代码,在执行函数时会播放库中的声音Actionscript 3 如何通过AS3播放声音?,actionscript-3,audio,Actionscript 3,Audio,什么是ActionScript 3代码,在执行函数时会播放库中的声音 soundClip = new Sound(); soundClip.load(new URLRequest("path")); soundClip.addEventListener(Event.COMPLETE, soundLoaded); soundClip.addEventListener(ProgressEvent.PROGRESS, soundLoading); function soundLoaded(e:Eve
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
}
这就像一部电影