Returns
An object that has two integer properties:
Description
Method; returns the number of bytes loaded and total number of bytes for a file that is being
loaded using
MovieClipLoader.loadClip()
compressed bytes. This method lets you explicitly request this information, instead of (or in
addition to) writing a
Example
The following example loads an image into a draggable, dynamically created movie clip called
. The number of bytes loaded and the total number of bytes for the loaded image
image_mc
display in a dynamically created text field called
this.createEmptyMovieClip("image_mc", this.getNextHighestDepth());
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
target_mc.onPress = function() {
this.startDrag();
};
target_mc.onRelease = function() {
this.stopDrag();
};
var mclProgress:Object = image_mcl.getProgress(target_mc);
target_mc.createTextField("filesize_txt", target_mc.getNextHighestDepth(),
0, target_mc._height, target_mc._width, 22);
target_mc.filesize_txt.text = mclProgress.bytesLoaded+" of
"+mclProgress.bytesTotal+" bytes loaded";
};
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip("http://www.macromedia.com/images/shared/product_boxes/
112x112/box_studio_112x112.jpg", image_mc);
See also
MovieClipLoader.onLoadProgress
MovieClipLoader.loadClip()
Availability
Flash Player 7.
Usage
my_mcl.loadClip(url:String, target:Object ) : Boolean
Parameters
The absolute or relative URL of the SWF file or JPEG file to be loaded. A relative path
url
must be relative to the SWF file at level 0. Absolute URLs must include the protocol reference,
such as http:// or file:///. Filenames cannot include disk drive specifications.
bytesLoaded
MovieClipLoader.onLoadProgress
and
bytesTotal
; for compressed movies, it reflects the number of
listener function.
.
filesize_txt
MovieClipLoader.loadClip()
.
635
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?