The data event occurs each time a host movie
clip receives a portion of an external .swf
file. The definition of what constitutes a "portion" is
more complex than you might expect. In order for a
data event to be triggered, at least one
complete new frame of the external .swf file
must have loaded since either: (a) the last data
event fired or (b) the .swf file started
loading. (More than one frame of the .swf file
may actually have loaded in that amount of time, but one frame is the
minimum number required to prompt a data event.)
The execution of data event handlers is tied to
the rendering of frames in the Player. With every frame rendered, the
interpreter checks to see if part of an external
.swf file has been loaded into a clip that has a
data event handler. If part of an external
.swf file has been loaded into such a clip, and
the loaded portion contains at least one new frame, then the
data event handler is executed. This process
happens once -- and only once -- per frame rendered (even if
the playhead is stopped).
Note that because the data event happens on a
per-frame basis, movies with higher frame rates tend to have
smoother-looking preloaders because they receive more frequent
updates on the status of loading .swf files.
The exact number of data events triggered during
a loadMovie( ) operation depends on the
distribution of content in the .swf file being
loaded and the speed of the connection. A single-frame
.swf file, no matter how large, will trigger
only one data event. On the other hand, a
.swf file with 100 frames may trigger up to 100
separate data events, depending on the
movie's frame rate, the byte size of each frame and the speed
of the network connection. If the frames are large and the connection
is slow, more data events will be triggered (up
to a maximum of one per frame). If the frames are small and the
connection is fast, fewer data events will be
triggered (the entire 100 frames may be transferred between the
rendering of two frames in the Player, prompting only one
data event).