flash - 在闪光灯中混合多种声音

标签 flash audio actionscript-2 mixing

我在Flash中有几个声音对象,我想在这些声音文件中混合不同点以创建一个杰作并将其另存为mp3。
我在网上看到了各种“混音器”应用程序,并且想知道自己可以进行哪些 Realm 的研究。

最佳答案

要创建音乐或尝试创建的任何音乐,您必须将wav和mp3文件导入到库中,然后将它们拖到电影区域中,以将它们添加到时间轴中。使用多层来帮助组织它们。要测试您的歌曲,您可以按Enter键以从任意帧开始播放直至结束。

如果您在时间轴中选择了声音,请别忘了您可以应用一些效果。另外,“属性”面板上有一个“编辑”按钮(默认情况下位于底部),可用于将音频剪辑修剪为所需的形状。

完成后,您必须将Flash电影发布到swf。然后,您必须像这样使用Swf到Mp3转换器:

http://3d2f.com/programs/25-187-swf-to-mp3-converter-download.shtml

(我不担保该软件,仅是示例)

如果您尝试使用ActionScript 2.0从代码中完成所有这些操作,那么您将会遇到困难。

本质上,您必须构建一个数组,其中包含已加载到电影中的所有修剪的声音字节。然后,必须在适当的时间在onEnterFrame中调用它们:

(我根本没有测试过此代码,只是为了给您一个基本的想法,哈哈)

var sounds = new Array();
var s0 = new Sound(this);
s0.attachSound("someLinkedSound0");
sounds.push({sound : s0, frame : 100});
var s1 = new Sound(this);
s1.attachSound("someLinkedSound1");
sounds.push({sound : s1, frame : 200});
var s2 = new Sound(this);
s2.attachSound("someLinkedSound2");
sounds.push({sound : s2, frame : 300});
var currentSound = 0;

this.onEnterFrame = function(e) {
    if(currentSound < sounds.length && sounds[currentSound].frame == _root.currentFrame) {
        sounds[currentSound].start(0,1);
        currentSound++;
    }
    frame++;
}

我的示例使用导入到您的库中并“链接”的声音,但是您可以稍作修改即可通过url加载声音。

如果由于应用程序的结构未调用onEnterFrame,则还可以使用从setInterval调用的方法来完成类似的操作。
希望对您有所帮助。

关于flash - 在闪光灯中混合多种声音,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1254403/

相关文章:

java - 具有良好音频支持的网络应用程序客户端框架

flash - 准确测量时间增量

javascript - Flash 应用程序可以有 Javascript API 吗?

html - Flowplayer中的HTML5音频

android - Android:使用音频文件填充listview并打开新 Activity

flash - 很久以前(有时)删除的 as2 类代码与日志跟踪一起执行

actionscript-3 - 将 AS2 SWF 加载到 AS3 SWF 中并在 URL 中传递变量

flash - 为什么 StringBuilder 被删除了?

android - x264可以在Android上执行音频录制工作吗

flash - ActionScript 2.0 和 ActionScript 3.0 项目