• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Controlling Sound > Attaching Sounds

Attaching Sounds

After your new sound object is instantiated, you must associate a sound with it. You can load an external MP3 file into your sound object (which is covered later in this chapter), or you can attach a sound from the Library. When you have multiple imported sounds in your Library, you have to convey to the sound object which one to play and control. You identify sounds in the Library by using the Linkage option, just as you did in Chapter 7 when you attached a movie clip from the Library to a movie-clip instance on the Stage. In addition to identifying your sound, the Linkage option exports it with the SWF file so that it will be available when called by the sound object. When the sound is identified with the Linkage option, you attach it to the sound object by using the method attachSound().

To attach a sound to the sound object:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint