不知道该怎么控制单个声音的停止?????

ilyvmly 2006-04-18 04:02:13
我就是定义两个声音对象,比如sound1和sound2,有三个按钮,按钮一程序:sound1.start();sound2.start() 按钮二程序:sound1.stop(); 按钮三程序:sound2.stop();
点击按钮一,两个声音同时播放,但只要按钮二和按钮三按下其中一个,声音全没了。????
不知道该怎么控制单个声音的停止?????
...全文
231 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
CHAOFA427 2006-07-02
  • 打赏
  • 举报
回复
你要在同一图层内
就不会出现这个问题了
makec 2006-06-16
  • 打赏
  • 举报
回复
楼上正解!
clark328 2006-05-27
  • 打赏
  • 举报
回复
Your code should look like this:

song1 = new Sound();
song2 = new Sound();
song1.attachSound("a_thousand_1");
song2.attachSound("a_thousand_2");
_root.playButton.onRelease = function() {
song1.stop();
song2.stop();
};

Try it.


www.NewYoung.cn

clark328 2006-05-27
  • 打赏
  • 举报
回复
不new声音对象的话,stop()黙认就是全局的。





www.NewYoung.cn
ilyvmly 2006-05-22
  • 打赏
  • 举报
回复
up myself

2,278

社区成员

发帖
与我相关
我的任务
社区描述
多媒体/设计/Flash/Silverlight 开发 Flash流媒体开发
社区管理员
  • Flash流媒体开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧