Getbytesloaded (Movieclip.getbytesloaded Method) - MACROMEDIA FLASHLITE2 ACTIONSCRIPT-LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

Example
The following example creates a movie clip called
that movie clip and uses
instance in the Output panel.
this.createEmptyMovieClip("square_mc", 1);
square_mc._x = 10;
square_mc._y = 10;
square_mc.beginFill(0xFF0000);
square_mc.moveTo(0, 0);
square_mc.lineTo(100, 0);
square_mc.lineTo(100, 100);
square_mc.lineTo(0, 100);
square_mc.lineTo(0, 0);
square_mc.endFill();
var bounds_obj:Object = square_mc.getBounds(this);
for (var i in bounds_obj) {
trace(i+" --> "+bounds_obj[i]);
}
The following information appears in the Output panel:
yMax --> 110
yMin --> 10
xMax --> 110
xMin --> 10
See also
globalToLocal (MovieClip.globalToLocal method)
(MovieClip.localToGlobal method)
getBytesLoaded (MovieClip.getBytesLoaded
method)
public getBytesLoaded() : Number
Returns the number of bytes that have already loaded (streamed) for the movie clip. You can
compare this value with the value returned by
what percentage of a movie clip has loaded.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Availability: ActionScript 1.0; Flash Lite 2.0
Returns
- An integer indicating the number of bytes loaded.
Number
MovieClip.getBounds()
. The code draws a square for
square_mc
to display the coordinate values of the
,
localToGlobal
MovieClip.getBytesTotal()
to determine
MovieClip
467

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash lite 2

Table of Contents