Flash 9 Sound Spectrum – Part 2

Here’s another fun one that I did last night. It looks like I did some crazy 3D Actionscript here but I’m simply moving the y property of a static 3D cube. Hey what can I say, it works. Click on it to check it out. If you want the source then click here.

Lee :-)


Flash 9 Sound Spectrum!

If you watched my last tutorial you know how much of pain it was to read audio data in Flash. The old “analyze in AE” method is now a thing of the past. The new SoundMixer.computeSpectrum() method reads audio data at runtime allowing you to create audio-driven animations. Click on the image below to see my first experiment. This only took 10 minutes! Get ready to see some crazy stuff from the Flash community. Source is below as well.

Flash Player 9 required!

[as]var s:Sound = new Sound();
var sc:SoundChannel;
var ba:ByteArray = new ByteArray();
var array:Array;

s.load(new URLRequest(“mix.mp3″));
sc = s.play(0,1000);

this.addEventListener(Event.ENTER_FRAME, spectrum);

var a:Number = 0;

function spectrum(event:Event)
{
a = 0;
graphics.clear();
SoundMixer.computeSpectrum(ba,true,0);
for(var i=0; i < 256; i=i+8)
{
a = ba.readFloat();
var num:Number = a*360;
graphics.lineStyle(num/15,0x0066FF|(num << 8));
graphics.drawCircle(stage.stageWidth/2,stage.stageHeight/2,i);
}

} [/as]

Lee


Flash Professional 9 Released!!

Just when you thought it was safe to get some sleep, Adobe has released a preview version of Flash 9 with Actionscript 3 support. Go there right now and download it!


Lee


Sound-Driven Animation Tutorial

I just uploaded a new tutorial at http://www.gotoandlearn.com called Sound-Driven Animation that shows how to export audio amplitude data from After Effects using a custom script. Then I show how to use that data inside of Flash to dynamically draw the music’s waveform with the Drawing API.

Hope you like it!
Lee


Breeze Presentation on Easing Tonight

I’ll be doing a live Breeze presentation tonight over at http://flashusersgroup.org. I will be talking about animation easing and will discuss the various tweening classes and kits that are available. I’ll also talk about Robert Penner’s legendary easing equations which are the core all of these APIs.

It’s open to the public so come on over! Starts at 5:00pm Pacific time.

Lee


1 - 5 of 8 Prev 5Next 5