快精灵印艺坊 您身边的文印专家
广州名片 深圳名片 会员卡 贵宾卡 印刷 设计教程
产品展示 在线订购 会员中心 产品模板 设计指南 在线编辑
 首页 名片设计   CorelDRAW   Illustrator   AuotoCAD   Painter   其他软件   Photoshop   Fireworks   Flash  

 » 彩色名片
 » PVC卡
 » 彩色磁性卡
 » 彩页/画册
 » 个性印务
 » 彩色不干胶
 » 明信片
   » 明信片
   » 彩色书签
   » 门挂
 » 其他产品与服务
   » 创业锦囊
   » 办公用品
     » 信封、信纸
     » 便签纸、斜面纸砖
     » 无碳复印纸
   » 海报
   » 大篇幅印刷
     » KT板
     » 海报
     » 横幅

在Flash中实现Winamp均衡器频谱效果

  首先看这个,音乐随便找了一个,不是很好听的


[全屏欣赏]


  这个的制作需要获取音频的波谱,把音频的波谱转化为数据,这个东东需要一个软件叫FLASHAMP这个软件很小,而且不需要安装,直接使用,等会儿把这个软件放在下面,送给兴趣者(它的使用异常简朴,顺便也说说它的使用方式)

  得到音乐的数据后,把这些数据作为数组中的元素,然后通过创建函数来调用,同时把这些值赋给MC的y坐标的缩放。

  详细地说:

  一、用FlashAmp获取音频数据

  二、打开flash,开始制作

  1、做作4个mc元件,上面的4个图形,注重只画4个就是了,上面的mc的运动是AS命令的
  2、做一个空的MC,用来写语句,其实也可以不做,写在桢上也可
  3、将4个MC分别拖到场景,命事例名分别为a1 a2 a3 a4
  4、将空mc拖到场景,命事例名为cont

  三、开始写AS

  1、在桢上初始化变量_root.cont.i = 0;
  2、把以下语句写在cont 这个MC上

onClipEvent (load) {
shuju = new Array(25, 29, 35, 39, 38, 36, 36, 36, 34, 33, 35, 36, 36, 36, 36, 35, 35, 34, 33, 34, 36, 36, 34, 32, 30, 29, 30, 32, 31, 30, 29, 30, 32, 33, 31, 29, 28, 30, 32, 31, 30, 33, 39, 42, 44, 40, 31, 27, 30, 35, 37, 35, 35, 35, 34, 33, 33, 34, 36, 39, 39, 37, 37, 39, 40, 42, 47, 52, 63, 67, 61, 58, 56, 66, 71, 66, 66, 61, 54, 53, 59, 58, 65, 70, 56, 58, 62, 57, 53, 54, 65, 63, 71, 78, 71, 71, 67, 60, 57, 65, 65, 65, 80, 75, 64, 62, 66, 71, 62, 58, 54, 62, 74, 69, 67, 64, 57, 55, 53, 54, 54, 67, 73, 57, 58, 63, 61, 55, 56, 67, 66, 71, 77, 70, 64, 58, 58, 60, 63, 62, 66, 71, 62, 61, 62, 63, 64, 58, 55, 54, 66, 70, 63, 69, 68, 61, 64, 71, 69, 57, 65, 68, 61, 65, 63, 56, 52, 64, 71, 65, 76, 77, 67, 67, 65, 64, 62, 65, 65, 67, 70, 60, 59, 60, 61, 62, 56, 49, 46, 61, 71, 69, 69, 60, 55, 53, 56, 56, 61, 72, 64, 61, 63, 58, 55, 51, 55, 58, 67, 70, 60, 66, 69, 73, 72, 64, 63, 56, 65, 80, 83, 78, 76, 84, 81, 61, 46, 47, 63, 70, 65, 61, 58, 58, 54, 53, 60, 60, 64, 59, 62, 70, 69, 60, 40, 40, 45, 55, 67, 54, 53, 55, 46, 43, 38, 46, 51, 59, 66, 58, 57, 56, 64, 80, 89, 86, 76, 80, 87, 77, 68, 67, 67, 66, 64, 59, 58, 70, 69, 68, 76, 70, 61, 52, 56, 67, 74, 69, 48, 51, 59, 52, 47, 40, 45, 41, 51, 65, 53, 42, 42, 63, 81, 84, 88, 90, 93, 93, 79, 65, 54, 49, 60, 70, 66, 71, 82, 76, 69, 64, 63, 61, 50, 55, 67, 75, 72, 55, 52, 56, 62, 70, 73, 65, 57, 72, 73, 58, 61, 69, 72, 65, 55, 56, 63, 78, 76, 61, 53, 45, 42, 44, 50, 49, 58, 63, 40, 43, 54, 48, 39, 38, 51, 53, 61, 60, 55, 58, 48, 45, 43, 45, 45, 53, 75, 69, 60, 65, 58, 65, 75, 69, 58, 66, 86, 84, 83, 80, 65, 57, 52, 55, 61, 67, 71, 56, 56, 64, 62, 58, 51, 60, 68, 73, 69, 55, 57, 56, 48, 43, 46, 47, 62, 87, 74, 59, 62, 59, 64, 61, 55, 49, 57, 83, 77, 72, 76, 66, 61, 54, 65, 73, 69, 62, 42, 45, 59, 58, 48, 56, 73, 70, 70, 63, 56, 57, 47, 43, 39, 47, 50, 57, 76, 68, 56, 46, 54, 79, 78, 64, 53, 63, 78, 71, 67, 65, 61, 62, 60, 62, 68, 77, 72, 64, 67, 62, 56, 49, 55, 63, 60, 68, 62, 56, 68, 64, 58, 62, 74, 78, 80, 83, 72, 66, 61, 65, 77, 67, 57, 56, 69, 81, 74, 72, 70, 68, 69, 78, 83, 79, 84, 70, 48, 50, 54, 56, 54, 52, 53, 64, 72, 58, 58, 61, 66, 80, 80, 70, 59, 64, 74, 74, 67, 56, 63, 75, 74, 65, 51, 60, 73, 64, 64, 62, 58, 59, 60, 66, 59, 64, 70, 73, 77, 67, 62, 55, 58, 61, 69, 86, 70, 56, 53, 43, 39, 36, 50, 57, 65, 73, 53, 47, 51, 58, 69, 67, 60, 46, 55, 76, 70, 68, 61, 54, 61, 58, 57, 61, 69, 65, 60, 68, 64, 58, 49, 54, 63, 67, 80, 70, 60, 58, 46, 45, 43, 46, 47, 58, 75, 62, 48, 39, 46, 63, 62, 56, 44, 56, 82, 86, 79, 60, 56, 66, 66, 64, 59, 69, 74, 71, 71, 64, 61, 53, 62, 76, 82, 79, 60, 49, 49, 52, 61, 62, 60, 62, 71, 77, 65, 60, 59, 67, 73, 64, 56, 54, 68, 76, 77, 78, 72, 68, 63, 65, 66, 73, 78, 55, 49, 56, 65, 85, 73, 60, 55, 63, 81, 69, 41, 20, 18, 24, 27, 22, 14, 16, 24, 31, 41, 45, 61, 79, 76, 62, 50, 65, 84, 81, 74, 63, 62, 62, 58, 61, 61, 72, 65, 56, 68, 69, 60, 51, 55, 56, 66, 74, 55, 51, 56, 49, 46, 44, 51, 52, 58, 63, 47, 45, 48, 62, 83, 83, 74, 53, 58, 76, 70, 61, 50, 55, 63, 73, 80, 83, 81, 56, 51, 63, 61, 52, 43, 56, 71, 73, 67, 46, 46, 52, 48, 46, 47, 52, 42, 51, 64, 53, 51, 46, 51, 63, 63, 56, 59, 78, 76, 72, 74, 57, 57, 65, 65, 69, 80, 80, 54, 50, 64, 64, 61, 59, 71, 68, 69, 70, 67, 80, 79, 74, 72, 72, 66, 54, 65, 78, 69, 58, 52, 63, 63, 50, 49, 61, 79, 78, 78, 80, 71, 69, 68, 77, 80, 77, 76, 57, 48, 51, 66, 70, 59, 59, 54, 54, 45, 53, 70, 60, 70, 75, 62, 59, 70, 80, 86, 93, 95, 81, 66, 61, 57, 48, 40, 51, 50, 45, 50, 59, 64, 63, 63, 67, 73, 68, 56, 58, 66, 65, 65, 65, 65, 53, 34, 21, 12, 7, 5, 4, 3, 2, 2, 2, 2, 2, 12, 22, 47, 81, 88, 84, 81, 81, 78, 71, 70, 74, 81, 82, 71, 72, 83, 89, 76, 61, 68, 75, 81, 81, 72, 69, 68, 73, 76, 69, 68, 72, 77, 77, 76, 84, 91, 85, 69, 61, 62, 71, 84, 86, 82, 66, 66, 81, 79, 72, 70, 76, 86, 88, 86, 83, 82, 78, 74, 83, 91, 89, 88, 89, 87, 71, 64, 63, 54, 54, 61, 69, 69, 63, 61, 62, 73, 72, 68, 69, 61, 71, 82, 76, 80, 89, 84, 73, 79, 85, 86, 89, 79, 70, 73, 79, 80, 74, 77, 76, 79, 88, 81, 70, 70, 82, 82, 74, 74, 79, 89, 91, 92, 95, 96, 95, 92, 88, 89, 91, 89, 93, 89, 74, 75, 86, 78, 73, 75, 78, 84, 79, 77, 78, 85, 83, 71, 72, 79, 83, 86, 86, 88, 78, 66, 63, 61, 60, 57, 65, 66, 64, 70, 70, 74, 70, 61, 60, 67, 77, 77, 76, 77, 82, 79, 69, 78, 84, 85, 82, 74, 76, 80, 84, 81, 71, 75, 73, 74, 80, 75, 72, 65, 73, 81, 77, 84, 88, 88, 82, 79, 90, 94, 87, 73, 67, 64, 74, 89, 93, 90, 75, 75, 91, 82, 68, 63, 68, 80, 78, 68, 63, 73, 81, 71, 74, 87, 92, 93, 93, 91, 75, 69, 67, 54, 52, 68, 81, 71, 65, 63, 73, 78, 65, 67, 71, 78, 86, 74, 66, 69, 80, 85, 76, 75, 75, 81, 86, 74, 63, 57, 67, 71, 68, 70, 68, 79, 90, 88, 82, 74, 69, 63, 72, 91, 95, 93, 86, 81, 77, 80, 92, 91, 68, 41, 40, 65, 74, 65, 62, 67, 77, 75, 68, 62, 57, 58, 55, 51, 51, 66, 69, 60, 60, 58, 54, 49, 63, 75, 72, 80, 73, 65, 66, 66, 77, 82, 80, 79, 78, 72, 61, 68, 83, 89, 87, 88, 93, 91, 92, 97, 96, 86, 72, 61, 54, 56, 58, 70, 87, 76, 63, 62, 60, 56, 52, 60, 62, 70, 76, 64, 71, 77, 79, 88, 87, 80, 74, 79, 77, 67, 68, 77, 89, 93, 94, 92, 84, 87, 92, 93, 90, 74, 62, 59, 59, 58, 70, 80, 66, 61, 66, 59, 51, 53, 59, 60, 68, 72, 69, 74, 71, 76, 86, 79, 67, 63, 73, 72, 59, 58, 73, 88, 94, 91, 88, 90, 93, 94, 92, 86, 70, 59, 56, 57, 57, 69, 76, 63, 58, 58, 65, 78, 80, 83, 79, 75, 71, 62, 63, 60, 69, 72, 76, 81, 82, 90, 85, 87, 92, 91, 82, 68, 63, 59, 58, 72, 77, 73, 67, 60, 61, 58, 56, 55, 68, 88, 77, 64, 64, 60, 54, 48, 55, 57, 66, 77, 64, 65, 69, 59, 57, 60, 68, 65, 70, 80, 72, 64, 55, 61, 68, 62, 58, 69, 85, 74, 65, 67, 62, 57, 52, 55, 57, 69, 76, 63, 59, 63, 59, 54, 53, 63, 64, 68, 68, 67, 71, 60, 54, 55, 69, 73, 74, 89, 83, 65, 67, 79, 81, 77, 73, 64, 57, 70, 78, 72, 65, 57, 57, 57, 56, 56, 65, 69, 55, 52, 53, 47, 42, 41, 44, 47, 53, 53, 48, 48, 44, 40, 37, 40, 39, 39, 50, 47, 40, 37, 34, 31, 28, 27, 27, 32, 34, 28, 26, 26, 21, 17, 19, 22, 21, 22, 21, 16, 14, 13, 13, 11, 10, 11, 11, 12, 10, 8, 7, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
function go() {
_root.a1._yscale = sndnow;
_root.a2._yscale = sndnow;
_root.a3._yscale = sndnow;
_root.a4._yscale = sndnow;
i++;
}
}
onClipEvent (enterFrame) {
sndnow = 100+shuju[i]*4;
go();
}

  那么多的数据是什么?就是用flashAmp获取的该音乐的数据,由于只说一下这个方式,所以懒得解释AS了,下面上传软件和介绍使用方式。

  打开此软件,如此图




  点击问号出现下图


  选择一个你需要的声音文件,单击打开,进入下图


  又与第一个图一样,多次单击方向,圈着的,进入下图


  在红圈着处输入你的FLASH的桢频,注重一定要相同,你的桢12,它也应当12,它的默认值是15,单击方向进入下图

  多次单击进入这个图


  点红线圈着的开始读取数据,这里需要等待一下,然后进入最后一个图



  这时表示已经读取完数据,需要你保存了,保存的结果是一个记事本,打开记事本,就会看到很多的数据,于是把这些数据做为数组中的元素就可以了

  点击下载源文件


返回类别: Flash教程
上一教程: 自己动手制作手机Flash主题动画
下一教程: Flash & Ajax 操作 XML 实例:无刷新分页

您可以阅读与"在Flash中实现Winamp均衡器频谱效果"相关的教程:
· flash中实现场景转变中的马赛克效果
· FLASH中实现眨眼睛的动画效果
· Flash实现在花间自由地翱翔小鸟的效果
· Flash+Photoshop实现图片模糊效果动画
· Flash制作实现"雪花飘"效果
    微笑服务 优质保证 索取样品