我创建了一个音乐循环,但问题是,当我将其放入flash中时,音乐即使在场景结束后仍在继续,如果我等待音乐结束,它将不会循环。
如何在flash中循环播放音乐,并在场景结束时结束?
我正在闪存cs6上使用actionscript2.0
发布于 2015-05-03 03:31:21
要停止声音或循环,请调用stop方法- Sound.stop()。
var my_sound:Sound = new Sound();
my_sound.loadSound("song1.mp3", true);
stop_btn.onRelease = function() {
trace("sound stopped");
my_sound.stop();
};
play_btn.onRelease = function() {
trace("sound started");
my_sound.start(0, 10); // Loop sound 10 times
};https://stackoverflow.com/questions/30006425
复制相似问题