var tabla:tablaDholak = new tablaDholak(); var channel:SoundChannel = tabla.play(); var jet:Jet_777_PassBy = new Jet_777_PassBy(); var congas:Congas = new Congas(); //var channel:SoundChannel = drum.play(); congas_btn.addEventListener("click", hearCongas); jet_btn.addEventListener("click", hearJet); function hearCongas(eventObj:Object):void { congas.play(); } function hearJet(eventObj:Object):void { jet.play(); } 1. Select File > Import > Import to Library, and then select a sound file and import it. 2. Right-click the name of the imported file in the Library panel, and select Properties. Click the Export for ActionScript checkbox. 3. In the Class field, enter a name to use when referring to this embedded sound in ActionScript. By default, it will use the name of the sound file in this field. If the filename includes a period, you must change it to something without a period. 4. Click OK. You might see a dialog box saying that a definition for this class could not be found in the classpath. Click OK and continue. 5. To use the embedded sound, you reference the class name for that sound in ActionScript. For example, the following code starts by creating a new instance of the automatically generated DrumSound class: var drum:DrumSound = new DrumSound(); var channel:SoundChannel = drum.play(); DrumSound is a subclass of the flash.media.Sound class so it inherits the Sound class's methods and properties, including the play() method as shown above.