MovieClip._framesloaded

Availability

Flash Player 4.

Usage

my_mc._framesloaded

Description

Property (read-only); the number of frames that have been loaded from a streaming SWF file. This property is useful for determining whether the contents of a specific frame, and all the frames before it, have loaded and are available locally in the browser. This property is useful for monitoring the downloading of large SWF files. For example, you might want to display a message to users indicating that the SWF file is loading until a specified frame in the SWF file has finished loading.

Example

The following example uses the _framesloaded property to start a SWF file when all the frames are loaded. If all the frames aren't loaded, the _xscale property of the movie clip instance loader is increased proportionally to create a progress bar.

if (_framesloaded >= _totalframes) {
  gotoAndPlay ("Scene 1", "start");
} else {
  _root.loader._xscale = (_framesloaded/_totalframes)*100;
}

See also

MovieClipLoader class