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

DID YOU KNOW?

  • A better way to use rateShift is to have your original sample represent the middle of a set of notes, rather than the first note. So, a middle-C sound sample might use rateShift to represent the G below it, up to the F sharp above it. The next and previous octaves would use other samples. This way, you minimize the amount of rateShift used on any sample.

  • If you don't like sliders or the single-button volume control, you have plenty of other options. You can use a text-based pop-up menu like the behavior described in Chapter 16, “Controlling Text.” You can also use a set of radio buttons. Even a dial is possible: Just have eight dial graphics, one for each sound level, and have the volume increase when users click the right side of the dial, and decrease when they click the left side.

  • Some developers prefer to usethe soundLevel system property instead of the volume property of each Sound channel. This system property can be set to values from 0 to 7, and it changes the actual volume of the sound on the user's computer. This means that all sounds, including digital video and system beeps, are affected. However, the soundLevel has been known not to work on many Windows sound cards.

  • You can create a mute button that uses some of the code from the check box behavior described in Chapter 15. Just have the behavior remember the current sound level and start in the “on” position. If users click the check box, set the volume property of the channel(s) to 0. When users click again, reset the volume to its original value, or better yet, use the soundEnabled property. This enables you to turn off sound without changing the volume of a specific channel.

  • Sound placed in QuickTime 4 tracks offers you even more control over what is playing and what is not. You can have multiple tracks, all synchronized, and turn off and on individual tracks with setTrackEnabled.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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