Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
ChArting And MultiMediA 167 Playing an Audio File As opposed to video, for which Flex provides ready-to- use built-in components, to work with audio we have to dive deeper into code. In fact, there is no audio player com- ponent and we need to get hands dirty with ActionScript code to load, play, and pause an audio file. This is why this section is at the end of the chapter and should be con- sidered pretty advanced, espe- cially if you are a designer. Let's explore some of the classes that we need to accom- plish our task. First of all, we have the Sound class, which allows the management of Figure 3.25 Creating a simple video viewer.