调用外部声音后如何控制声音的播放次数

      教程习题 2008-11-29 23:25

http://space.flash8.net/bbs/viewthread.php?tid=348709

调用外部声音后如何控制声音的播放次数

music = new Sound();
music.attachSound("yu");//yu是库中的声音
music.start(0, 3);//这里可以实现声音放三次
-------------
现在 我用另一种方法播放声音:
bg_sound = new Sound();
bg_sound.loadSound("sound1/yu.mp3", true);//这里是外面的声音文件
bg_sound.onSoundComplete = function ()
{
    bg_sound.start(0, 3);//但这里却不能实现播放三次的功能,而是循环播放,请问这是什么问题啊??
难道是只有把声音导入库中后才能控制播放次数的吗,高手请帮帮忙解答一下。
};
-----------
bg_sound.onLoad = function (success)
{if(success){
    bg_sound.start(0, 2);
};
};

定义的参数应该是0,1,2这三个吧~
_sound.start()的第一个参数是播放头 第二个参数是播放次数
标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commentauthor}
{commentauthor}
{commenttime}
{commentnum}
{commentcontent}
作者:
{commentrecontent}