Archive for January, 2009|Monthly archive page

SoundSkin 1.0 – open source AS3 component

Following up my post from yesterday about easy sound control, I’ve continued expanding upon that class by adding in load management, percentage-based controls, and built-in mute/playback toggles. The class has become handy and robust enough that I’ve set up an official project page for it on Google code. So, SoundSkin is born, weighing in as a lightweight (1.5k) component. May it save many a developer from the headaches of “quick and dirty” sound implementation.

Full project source code, documentation, and a simple demo are available on the project’s Google code page:


Easy sound control in AS3

Yes, it’s possible!

To give Adobe their due credit, the new sound system in AS3 does make a lot of sense from an OO programming standpoint. However, what about basic usability? There’s no two ways about it: the new design pattern takes some serious head-scratching to assemble all the pieces of API; as in: you need to play the sound to get the sound channel to stop the sound or to listen for the complete event… you know the drill.

So, I recently got fed up and finally just built a definitive wrapper for sound objects that would take care of ALL the nuances of sound playback, making them simple to control. This includes some crazy features like the ability to pause and resume a looping sound (can you say “background music”?), or the ability to toggle a sound in and out of a loop. So, just instance the class below with a Sound object in its constructor, and this wrapper will provide an extremely simple API to control the sound with.

UPDATE: This post has evolved into SoundSkin, an ActionScript 3 library for easy sound management. I’ve set up an official project page on Google code at: See the download page for source code and full documentation. I am posting updates and extentions as I create them.