Getbytestotal (Movieclip.getbytestotal Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Add the following code on Frame 2:
if (this._framesloaded<this._totalframes) {
this.gotoAndPlay(1);
} else {
this.gotoAndStop(3);
}
Place your content on or after Frame 3, and then add the following code on Frame 3:
stop();
See also

getBytesTotal (MovieClip.getBytesTotal method)

getBytesTotal (MovieClip.getBytesTotal method)
public getBytesTotal() : Number
Returns the size, in bytes, of the movie clip. For movie clips that are external (the root SWF
file or a movie clip that is being loaded into a target or a level), the return value is the
uncompressed size of the SWF file.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Availability: ActionScript 1.0; Flash Player 5
Returns
- An integer that indicates the total size, in bytes, of the movie clip.
Number
Example
The following example uses the
frames are loaded. If all the frames aren't loaded, the
instance
is increased proportionally to create a progress bar.
loader
Enter the following ActionScript on Frame 1 of the Timeline:
var pctLoaded:Number = Math.round(this.getBytesLoaded()/
this.getBytesTotal()*100);
bar_mc._xscale = pctLoaded;
Add the following code on Frame 2:
if (this._framesloaded<this._totalframes) {
this.gotoAndPlay(1);
} else {
this.gotoAndStop(3);
}
864
ActionScript classes
property to start a SWF file when all the
_framesloaded
property of the movie clip
_xscale

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF