This is a blog about Flash by betaruce :-)

Calendar

August 2006
M T W T F S S
« Jul    
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31  

July 9, 2006

AS3: Water Spectrum

Filed under: My Flash Programs — betaruce @ 6:20 pm

Combine the new computeSpectrum of the SoundMixer class with some water ripple effect

http://as3.betaruce.com/WaterSpectrum/WaterSpectrum.swf

Turn on your speaker. The larger the value computeSpectrum returns, the more the ripples e.g. when the song goes silent, there will be less ripples.

Song: Last War by Jay (3.9MB mp3 loaded dynamically into swf)

Update: Download the source here. Let me know if you still encounter any errors :)

• • •

10 Comments »

  1. Hi.

    I am getting this error when I try to view the example (fp 9.0.16 debug):

    ArgumentError: Error #2015: Invalid BitmapData.
    at flash.display::BitmapData$iinit()
    at WaterSpectrum$iinit()

    Comment by Aran — July 9, 2006 @ 7:21 pm
  2. Thanks for reminding. The error is fixed.

    Comment by betaruce — July 9, 2006 @ 7:55 pm
  3. Hi there..
    My error:
    TypeError: Error #1010: A term is undefined and has no properties.
    at WaterSpectrum/WaterSpectrum::onEnterFrame()

    Comment by savvas — July 9, 2006 @ 8:36 pm
  4. what is your Flash Player version?

    Comment by betaruce — July 9, 2006 @ 9:33 pm
  5. No joy for me:

    TypeError: Error #1010: A term is undefined and has no properties.
    at WaterSpectrum/WaterSpectrum::EF()

    Flash Player 9,0,16,0 debug

    Comment by Paul Neave — July 9, 2006 @ 10:43 pm
  6. I get a completely different error:

    Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
    at WaterSpectrum$iinit()

    Comment by Dave Gillem — July 9, 2006 @ 10:45 pm
  7. I have no idea about error 1010 since I do not have such an error, but I guess error 2044 are due to loading of media into Flash (since my server is quite unstable several hours ago).

    Comment by betaruce — July 10, 2006 @ 1:20 am
  8. Sorry, I’m getting nothing here except a small popup with a red background (in firefox 1.5.0.3, flash player 9.0.16.0)

    Comment by sascha of H1DD3N.R350URC3 — July 10, 2006 @ 1:32 am
  9. this is due to server problem…the sound needs time to be loaded.

    Comment by betaruce — July 10, 2006 @ 1:33 am
  10. I’m
    interesting in mp3 music and spend most of my spare time by visiting different
    music sites. This one is really good. I found a lot of pretty things here.
    Thanks 

    Comment by lesly — August 15, 2006 @ 10:56 pm

Comments RSS • TrackBack URI

Leave a comment

Powered by: WordPress • Template by: Priss