I’m finally getting around to putting Flash, ActionScript 3.0 and Max/MSP to work creating animation driven, interactive sound.
The Flash animations I’m using are based on Keith Peters examples in his terrific book Foundation Actionscript 3.0 Animation: Making Things Move! I’m also using Olaf Matthes Flashserver external to create a bi-directional socket connection between Flash and Max/MSP.
In this example I’m using a modified version of Keith’s Bouncing2 class as the Flash document class. There are no assets in the library and no frame scripts in the file. Here are the resources being used on the Flash side:
- Test.fla // empty Flash document
- Bouncing2.as // bouncing action with gravity, used as document class for the Test.fla file
- Ball.as // object to bounce
- FlashserverConnect.as // create socket connection and handle events
Note: The socket connection details are handled by the FlashserverConnect class and Max/MSP external Flashserver as detailed in my previous post.
This is about as basic as it gets but it really does open up a universe of exciting interactive sound and music possibilities.
On the Max/MSP side the patcher features an instance of the Flashserver external and a few widgets to create some visual and auditory feedback. Here are the required resources for Max/MSP:
- Flashserver // http://www.nullmedium.de/dev/flashserver/
- AS3 Max.maxpat
Run the Max/MSP patcher and test the flash movie or publish it as a projector file (note that exporting the movie and running it in the Flash Player outside the browser generated security warnings).
The bouncing ball will trigger the keyboard object that creates a MIDI note and routes it to the OS. It also sends the values to a series of conditionals that trigger a series of 6 different basketball sounds, each one recorded at a different level.
It’s crude but it’s a start.
Zip archive of the files coming soon.



