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

Lesson 17. Scripting for Sound > Attaching Sounds and Controlling Sound Playbac...

Attaching Sounds and Controlling Sound Playback

In non-dynamic projects, sounds are placed directly on and controlled from the timeline. 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—we want control! That's why in this exercise we show you how to leave those sounds in the library and call on them only when you need them. Using other methods available to Sound objects, you'll learn how to add sounds and control their playback 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 anytime you want. To do this, you must assign identifier names to all the sounds in the library. After these sounds have identifier names, you can attach them to Sound objects and control their playback and even their volume and panning, as we discussed earlier in this lesson.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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