Game Development Reference
In-Depth Information
SOUNDS IN FLASH
Flash provides a basic interface for performing simple audio functions. In Flash, sounds can be inserted
into the Library of an existing project and placed on a timeline so the audio can be looped, volume
balanced, faded in and out, and timed to particular screen events. Native audio-compression codecs
then render out the audio with the rest of the project into a i le format called SWF, short for Shockwave
Flash. (Shockwave was a multimedia audio library created by Macromedia and subsequently folded
into Flash.) SWF is a container format that holds all creative elements of a game or application created
in Flash.
Sound can also be called from an external sound library. Sound triggered in this manner must already be
fully mixed and compressed because the programmer simply points to the sounds and they are played
back at the appropriate timing.
NOTE: Sound called from external MP3s can create the same skipping problem that we mentioned earlier
due to the usage of frames rather than samples. Sounds imported into the Flash timeline, however, can
be set to loop seamlessly.
Flex-Based Solution
Sound can be called in Flash in a third way, which avoids this problem. Although many programmers
and developers new to Flash development tools are unaware of this solution, sounds can be imported
into a standalone instance of Flash and batch-compressed using native MP3 compression within Flash.
The entire library can then be exported as an SWF i le. The programmer can then catalog that i le and its
contents, so it can be called into the game or program. The end result is audio that makes full use of the
audio tools and native compression within Flash and still loops properly and seamlessly when it is called
externally.
Conclusion
We've once again covered a lot of ground, and yet barely scratched the
surface of audio for a new generation of gaming. As time progresses you
will see which predictions we've made are accurate, and which others fall
 
Search WWH ::




Custom Search