Using Flash Sound Visualizer
I’d like to talk a bit about the issues we had when building our third product, Simple Flash Mp3 Player.
As you obviously noted, we used a nice sound visualizer which reacts to the sound played in the flash file. Lucky the necessary functions are implemented in Flash CS3 and newer versions.
The thing that was a bit difficult to understand was the way it works. And I will explain so you can understand why we did what we did.
If you ever used a mask in Flash, you know the visible part of the object on which we apply the mask is exactly the part that is under the mask shape. You can either apply the mask in Flash on the layers, or by code.
With the Sound Visualizer it’s a different story. It works as a mask, but the visible part is anything there is UNDER it’s layer, or if you position it in code, the visible part is what’s on deeper layers.
What we did in Flash was to create two backgrounds. One white for the visualizer, and one gray of the part above the visualizer. This is why it looks as if the visualizer is white.
We also applied two different masks on the white movieclip, with different transparency. This is a trick in Flash, and it works nicely in such situations. Both the masks and the white masked movieclip had their Cache As Bitmap property set to true, which is mandatory to have this effect work correctly.

If you want to see the code and how we proceeded, please feel free to download the product from our ARCHIVE page. It’s free and the download comes with all the files. If there are any questions at all, or if you need a step by step tutorial on this, let us know and we’ll make some time to create one. :)
blog entries 

Products RSS Feed
Follow us on twitter