Actionscript 3.0提供的新功能,其中用到了ByteArray、SoundMixer。
代码如下:
function func(a:Number) {
return num * Math.sin(a);
}
function drawFunction(func:Function, thickness:Number, color:Number) {
graphics.lineStyle(thickness, color, 100);
graphics.moveTo(30, stage.stageHeight / 2 - func((30 + t) / 20) * 20);
for (var i = 30; i 请用Flash 9/ActionScript 3.0发布测试
[url=http://www.flashxm.com/upload/flash_sound_wave.rar]
[color="#0000ff"]下载(download)[/color]
[/url]
ps: 更牛效果请看http://theflashblog.com/?p=182
在线帮助文档:http://livedocs.macromedia.com/flex/2/langref/package-summary.html
本文转自:http://www.5uflash.com/flashjiaocheng/Flash-as3-jiaocheng/1744.html
代码如下:
function func(a:Number) {
return num * Math.sin(a);
}
function drawFunction(func:Function, thickness:Number, color:Number) {
graphics.lineStyle(thickness, color, 100);
graphics.moveTo(30, stage.stageHeight / 2 - func((30 + t) / 20) * 20);
for (var i = 30; i 请用Flash 9/ActionScript 3.0发布测试
[url=http://www.flashxm.com/upload/flash_sound_wave.rar]
[color="#0000ff"]下载(download)[/color]
[/url]
ps: 更牛效果请看http://theflashblog.com/?p=182
在线帮助文档:http://livedocs.macromedia.com/flex/2/langref/package-summary.html
本文转自:http://www.5uflash.com/flashjiaocheng/Flash-as3-jiaocheng/1744.html
本文介绍如何使用Actionscript3.0中的ByteArray与SoundMixer实现音波绘制功能,并提供了一个示例代码,展示了如何根据声音信号绘制出相应的波形。

2116

被折叠的 条评论
为什么被折叠?



