MovieClip._framesloaded
Availability
Flash Player 4.
Usage
my_mc._framesloaded:Number
Description
Read-only property; 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. It is also 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
are loaded. If all the frames aren't loaded, the
is increased proportionally to create a progress bar.
Enter the following ActionScript in Frame 1 of the Timeline:
var pctLoaded:Number = Math.round(this.getBytesLoaded()/
this.getBytesTotal()*100);
bar_mc._xscale = pctLoaded;
Add the following code to Frame 2:
if (this._framesloaded<this._totalframes) {
this.gotoAndPlay(1);
} else {
this.gotoAndStop(3);
}
Place your content on or after Frame 3. Then add the following code to Frame 3:
stop();
See also
MovieClipLoader class
516
Chapter 2: ActionScript Language Reference
property to start a SWF file when all the frames
_framesloaded
_xscale
property of the movie clip instance
loader
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?