当前位置:首页 > 设计在线 > 平面动画 > Flash > flash中音乐的播放暂停偷懒方法

flash中音乐的播放暂停偷懒方法

点击次数:38 次 发布日期:2008-11-21 23:31:05 作者:源代码网
源代码网推荐 具体步骤
首先在场景的第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");
}
源代码网供稿.
网友评论 (0)
会员中心
设计在线
本站推荐
设计在线之精华