In the next sections, you will create both the SoundController component and the main jukebox movie code that is responsible for making this application work. All the subsequent code is contained within a single Flash document. Therefore, the first step in this process is to create a new Flash document named jukebox.fla and save it.
The JukeboxController component is an essential part of the jukebox application. It is required to play the songs. The component uses two SoundController components so that one song can be queued while another is playing. Here are the steps to follow to complete the component:
The jukebox controller requires the SoundController component from Recipe 13.16. If you completed that exercise, you should have a Sound Controller menu option in the Components panel, which contains a SoundController component. Otherwise, you can download and install the completed SoundController component from http://www.person13.com/ascb/components/soundController.zip.
Once you have the SoundController component installed, create a copy of it in your jukebox movie’s Library by dragging an instance onto the Stage and deleting the instance. The symbol remains in the Library, even after the instance is deleted.
Create a new movie clip symbol named
Open the linkage properties for the
JukeboxController symbol using the Library
panel’s pop-up Options menu.
Select the Export for ActionScript and Export on ...