_soundbuftime Global Property

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
_soundbuftime Global Property Flash 4

length of a streaming sound, in seconds, to preload read/write
_soundbuftime

Description

The _soundbuftime property is an integer specifying the number of seconds of a streamed sound to preload before playing the sound (the default is 5 seconds). It applies to both timeline sounds and sounds loaded at runtime via Sound.loadSound( ).

Flash synchronizes movie playback with streaming sounds to ensure that, say, a cartoon character's lips match an accompanying soundtrack. Animations will pause until _soundbuftime seconds of streaming sound are downloaded; therefore, a large setting (long delay) can cause excessive startup times on slower connections. Because network streaming may be slow or briefly interrupted, a short _soundbuftime setting can cause sound to skip (i.e., if enough sound data wasn't buffered, sounds may be interrupted temporarily). The ideal setting will vary from movie to movie based on the complexity of the graphics, the quality settings of the sound, and the bandwidth of the end user's Internet connection. The default setting (5 seconds) usually works well, but experimentation may be required to find the best setting for individual cases. The streaming buffer time can be changed during playback, but it is a global property and cannot be set separately for individual sounds.

Example

_soundbuftime = 10;  // Buffer 10 seconds of audio

See Also

The Sound object, stopAllSounds( )



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net