ABSTRACT

Let’s explore some of the classes that we need to accomplish our task. First of all, we have the Sound class, which allows the management of basic functionalities related to sound. It works well in combination with the SoundChannel class, which is used to control the playback of audio files. Finally, there is the SoundTransform class, which enables the manipulation of volume and panning. All these classes are included in the flash.media package. To load an audio file the procedure is pretty similar to the one explored in Section 2 regarding loading remote files: You create an object to manage events, and when loading is done you can use an audio file as you wish.