gpt4 book ai didi

actionscript-3 - 如何通过AS3播放声音?

转载 作者:行者123 更新时间:2023-12-03 02:25:41 25 4
gpt4 key购买 nike

执行功能时,将从库中播放声音的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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com