Sync Setting in Flash
There are 4 synchronization options from which to choose: Event, Start, Stop and Stream as shown in the diagram below.



If you choose the Event option, the sound will start at whichever frame you attach the sound and will continue to play in its entirety. If you have set a certain number of loops, all the loops will play out in their entirety. It is important to note that once an Event sound starts to play, it will continue to play independently of the timeline. For example, if you import a song 30 seconds in length and set it to Event, it will play out entirely and run independently of what is occurring visually, even after the animation in the timeline may have ended. Generally the Event setting is ideal for short sounds or effects containing a single audio message such as a door slamming or a cannon firing. This allows you to sync up the sound with the graphics for the effect desired in a short time frame. Finally Event sounds must be loaded entirely in order for them to play (unlike Stream as you will see below).

The Start option is not much different from Event except that if your sound is playing already, another instance of the sound begins playing. Generally you will use the other sync settings more often than the Start option.

The Stop option stops only the sound that is specified (2). This is very useful when you wish to stop a specific sound from a group of sounds that may be playing simultaneously. This is different from adding an action to Stop All Sounds in that you are selectively silencing a certain sound(s) and letting the other(s) to continue playing.

Stream is very different from the Event option. The Stream option synchronizes the sound with the animation thereby forcing the animation to keep pace with the sound. If for whatever reason (memory or processor speed), the viewer's computer cannot draw each frame, Flash® will skip as many frames as needed in order to keep pace with the sound. Unlike an Event sound, a Stream sound cannot play outside of the timeline. That is, once the timeline ends or there are no more frames to play, the sound ends. Another important feature is that Stream allows the music (and presentation) to stream over the web; that is, once enough data is loaded, it begins to play. For example, if you set a 30 second song to Stream, it will begin to play sooner than if you set it to Event. Event will require the song to fully load before playing.

One very important distinction between Event and Stream is this: Event will not add file size whenever you use instances of a sound that is already in your library. Stream will. For example, suppose we have a 5 second sound file. We import it into Flash® and put it in the timeline. We loop it 6 times. The result is that we have about 30 seconds worth of music (6 loops x 5 seconds). Flash® will read the sound file only as having 5 seconds worth of music. So even though we loop the sound file 6 times (or even 500 times!), the exported file size associated with this audio will only be 5 seconds worth of music. The actual file size in Kb will depend on the compression that you impose on the file.

Now if we take the same sound file and set it to Stream in the timeline and again set it to loop 6 times, the result will again be 30 seconds worth of music; however, because of the nature of Stream, the exported file size will be associated with 30 seconds worth of music. It is as if you had recorded a 30 second piece of audio and imported it into Flash®. Streaming is linear and so the playhead in Flash® will read content as it moves forward in time. Remember also though that Stream will begin to play content as soon as enough of it has loaded. When the entire file has finished playing, the end result is that, with Stream, the actual fie size that was downloaded on the user's computer will be 6 times larger (according to the mentioned example) than with using Event.

So if you must use Stream (because you need to tie animation to sound), don't limit yourself to a short loop that loops almost endlessly. Feel free to use variety in the music since with Stream, file size is associated with the entire length of the presentation.


Close    To Top
  • Prev Article-Flash:
  • Next Article-Flash:
  • Now: Tutorial for Web and Software Design > Flash > Flash Articles > Flash Content
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Geek Tutorial
     

    Blogging Tutorial

      RSS Tutorial
      Podcasting Tutorial
    Graphic Design Tutorial
      Coreldraw Tutorial
      Illustrator Tutorial
      3D Tutorials
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial/ Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial/ Articles
     

    XML Style

      AJAX Tutorial
      XML Mobile
    Flash Tutorial/ Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial/ Articles
      Linux Tutorial
      Symbian Tutorial
      MacOS Tutorial
    Personal Tech
      Hardware Tutorial
      Software Tutorial
      Online Auction