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

Chapter 8. Controlling Sound > Using the Sound Object

Using the Sound Object

Attaching a sound file to a keyframe in the Timeline is an easy way to incorporate sounds into your movie. Two common ways to integrate sound on the Timeline are to use the Event Sync option to play a clicking sound in the down state of a button symbol and to use the Stream Sync option to synchronize dialogue with an animation. But if you need to control when a sound plays, change its volume and playback through the left and right speakers dynamically, or retrieve information about the number of seconds it has been playing, turn to the Sound object.

The Sound object is a Flash-defined class whose methods control its playback behavior and whose properties can help you control its timing. You need to instantiate the Sound object by using a constructor function to give it a name, just as you did with the Color object in Chapter 7. When the Sound object is named, you’ll be able to use it to play and modify sound files that you associate with it.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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