具体步骤
首先在场景的第1帧添加as:
s=new Sound(); //这是绑定声音的代码
s.attachSound("s");
然后在播放按钮上添加:
on (release) {
s.start(p/1000);
}
在暂停按钮上添加:
on (release) {
s.stop();
p = s.position;
}
最后在停止按钮添加:
on (release) {
s.stop();
p = s.position("0");
}
本文转自:http://www.5uflash.com/flashjiaocheng/Flashjichucaozuo/88.html
首先在场景的第1帧添加as:
s=new Sound(); //这是绑定声音的代码
s.attachSound("s");
然后在播放按钮上添加:
on (release) {
s.start(p/1000);
}
在暂停按钮上添加:
on (release) {
s.stop();
p = s.position;
}
最后在停止按钮添加:
on (release) {
s.stop();
p = s.position("0");
}
本文转自:http://www.5uflash.com/flashjiaocheng/Flashjichucaozuo/88.html
本文详细介绍如何在Flash中实现声音的绑定与播放控制。通过具体步骤指导如何使用ActionScript在场景的第1帧绑定声音,并在播放、暂停及停止按钮上添加相应事件处理代码来控制声音播放。
1468

被折叠的 条评论
为什么被折叠?



