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

Chapter 16. Scripting for Sound > ATTACHING SOUNDS AND CONTROLLING SOUND PLAYBA...

ATTACHING SOUNDS AND CONTROLLING SOUND PLAYBACK

In non-dynamic projects, sounds are placed directly on, and controlled from, the timeline. This means that if you want a sound to play in your movie, you must drag it from the library onto the timeline and then indicate when and how long it should play as well as how many times it should loop on playback. Although this may be a fine way of developing projects for some, we’re ActionScripters—which means we want control! That’s why in this exercise we’re going to show you how to leave those sounds in the library and call on them only when you need them. Using some more methods available to Sound objects, you’ll learn how to add sounds and control their playback—all on the fly.

When you create a Sound object in Flash, one of the most powerful things you can do with it is attach a sound—in essence pulling a sound from the library that can be played or halted any time you wish.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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