Tuesday, December 21, 2010

Sound Bound!

Working with sounds is a bit tricky, is the notion I used to have earlier. When to use event sound, when to use stream sound, was always a confusing thought. But with time and practice, I could realize when to bound which sound.

Basically, sounds are of two types:

1. Event Sound
2. Stream Sound

Event sounds are those which play in sync to any event. Any sound like that of a music, or a button click, which are animation and timeline independent, are played using event sounds. These sounds continue to play even if the objects (like buttons or the movie clips) are removed. Any successive start of the sound again, like for instance, by clicking the button repeatedly, will start the sound again and again, keeping the old sound play in continuation. Hence we can have multiple instances of these sounds, until and unless they are stopped explicitly. Event sounds start playing only when they are downloaded completely by the swf file.


Stream sounds are those which play in sync to any animation/timeline. If the animation fails to keep up in pace with the sound, it is forced to skip a few frames. These sounds stop when we close the swf file. Any animation will play with only one sound instance. If the animation reaches the last frame, the sound stops, even if it hasn't reached its end. In other words, the stream sounds cannot play longer than the length of the frames that it occupies. Such a sound starts playing as soon as some percentage of it is loaded in the memory. If the loading is interrupted by any chance, the sound play is also interrupted. 

No comments:

Post a Comment