Controlling Sound with ActionScript
Although most of us can enjoy listening to music without thinking too much about what we're hearing, the vibrations that make up even the most elementary sounds are actually far from simplea fact made evident by the processing-power requirements of most audio-editing programs. Despite the complexity of even the simplest audio clip, however, sounds can be broken down into three basic characteristics:Length.
A sound's length can provide sensory cues about size (the short chirp of a small-car horn compared to the roar of a semi-truck's horn) and urgency (the tinkle of a viciously shaken dinner bell compared to the long bong of a lazy Sunday church bell).Volume.
A sound's volume provides clues about distance. Louder sounds give the feeling of closeness, whereas quiet sounds imply distance. A sound that gradually goes from quiet to loud or vice versa creates a sense of movement.Panning.
Panning represents the position of the sound from left to right or right to left. Like volume, panning allows you to determine the relative position of the element making the sound. If you were to close your eyes at a tennis match, you could accurately determine the position of the ball (left or right of the net) simply by the "pop" of the ball being smacked by the racket.
With Flash, you can control sound characteristics simply by editing sound instances on the timelinea solution that works well for presentations that don't require audience or user participation. However, if you want to give your user controlallowing the user to move and slide things aroundyou need a more dynamic solution. Fortunately, you can easily emulate and control all of these sound characteristics via ActionScript.
• Table of ContentsMacromedia® Flash MX 2004 ActionScript: Training from the SourceBy
Derek Franklin, Jobe Makar Publisher: Peachpit PressPub Date: November 19, 2003ISBN: 0-321-21343-2Pages: 636
Sure, you can use Flash MX 2004 without being a master programmer, but as any Flash developer worth his or her salt will tell you, you''''re not tapping all of its power unless you''''re taking advantage of its scripting language "ActionScript 2.0" which offers a more robust programming model and better object-oriented programming support than ever before. Here to take the fear factor out of learning it are Flash veterans and best-selling authors Derek Franklin and Jobe Makar, who demonstrate that scripting is an instinctual process you already know by translating real-life activities into ActionScript scripts. In these pages, you''''ll find methodologies and techniques for building over 40 real-life Flash ActionScript projects, including sample games, applications, Web sites, and more. New in this edition are coverage of ActionScript 2.0, Web services, Components, Printing, Video, and more. On the companion CD, you''''ll find all the project files and images you need to complete each project.