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

Playing a Sound

Unfortunately, there is no simple way to play a sound. You will have to import the sound, write several lines of code, and then write several more lines of code to play the sound in anything but the standard way.

Linking and Playing Sounds

The first thing you need to do before playing a sound with ActionScript is to link it. Import the sound into the Library, select Linkage from the Library panel's menu, and set the sound to export with the movie. You can also assign a different linkage name to the sound, but Flash starts you off with the same name as the Library element, which is the same name as the file.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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