Join Todd Perkins for an in-depth discussion in this video Working with sound wave data, part of Flash CS4 Professional Audio Techniques.
Now, we'll look at taking sound wave data and displaying it visually using…Flash's Drawing API.…In my sound wave data class file, we're going to scroll down to show sound waves.…The fist thing I'm going to do here is create a variable called lineY.…This is going to represent the Y position of the lines that we're going to draw…for the left and right sound channels.…So, I'm going to set it as a number equal to 0.…I'm going to go down a few lines, and then I'm going to use the method SoundMixer.…
SoundMixer is in charge of general sounds for all of the Flash applications.…So, this controls all sounds .computeSpectrum.…This method takes a Byte Array, and then puts the sound wave data inside of…it, so that you can output it visually if you want to, or do whatever you want…with that information.…If you have more than one sound channel object in your application, this will…apply globally to all the sound channels in your applications.…So, just keep that in mind as your using this.…
So, now the first property that we've put in is the Output Array, and that's…
- Playing and pausing audio in a created player class
- Controlling audio progress and showing it in a text field
- Loading XML playlist data into the final player
- Animating a volume slider and using effects to add depth
- Making Flash applications sharable
- Viewing the finished player and taking it for a spin
Skill Level Intermediate
Q: I am having trouble getting the exercise files to work for this title. For example, when I drag the progress bar of a song to another location on the slider, the movieclip always jumps back to the beginning and the song starts over. What could be causing this error?
A: An update to Flash since the time of recording broke this functionality. The problem appears to happen when Flash compiles the SWF in Flash Player 10. If you change your publish settings to Flash Player 9 instead, you won't see any problems.