From the course: Learning ActionScript
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Sound, SoundTransform, and SoundMixer - ActionScript Tutorial
From the course: Learning ActionScript
Sound, SoundTransform, and SoundMixer
One of the often overlooked features of ActionScript is the robust nature of its sound APIs. In this lesson we'll see how to set up a Sound object for MP3 playback. So in Flash Builder we do a number of imports here including flash.media.sound, which is the primary Sound object in ActionScript. And it's supported by things like flash.media.SoundChannel,flash.media.SoundMixer, and SoundTransform. We load in the actual MP3 file through Flash.net.URL request. And can monitor the bytes being processed through flash.utils.byteArray. So let's look at some of thee variables that we've created for this class. So, here we're creating a private constant of sound_file which is a string pointing to music.mp3 which is a file on our local system here. We're also going to create a private variable called Sound which is mapped to a Sound object. S Transform mapped to SoundTransform, S Channel, which is a SoundChannel object. And then we have a variable called id3, which is a Boolean. In this, we'll…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.