Name
_soundbuftime Global Property — length of a streaming sound, in seconds, to preload
Availability
Flash 4 and later
Synopsis
_soundbuftime
Access
Read/write
Description
The _soundbuftime
property is an integer
specifying the number of seconds of a streamed sound to preload
before playing it. The default is 5 seconds.
Flash synchronizes movie playback with streaming sounds to ensure
that, say, a cartoon character’s lips match an accompanying
sound track. Animations will pause until
_soundbuftime
seconds of streaming sound are
downloaded; therefore, a long setting 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). 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
Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.