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

Chapter 8. Controlling Sound > Reading Sound Properties

Reading Sound Properties

The Sound object provides two properties that you can use to find out more about the lengths of sounds. position is a property that measures the number of milliseconds that a sound has been playing. duration is a property that measures the total number of milliseconds of the sound. Both properties are read-only.

Use position and duration to time your animations to your sounds. In the following task, you modify an image according to the length of time a sound has been playing. As the sound plays, the image slowly reveals itself. When the sound ends, the image is revealed completely.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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