
MovieClipLoader
957
this.createEmptyMovieClip("tester_mc", 1);
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
trace("movie loaded");
}
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip("http://www.yourserver.com/your_movie.swf", tester_mc);
If your SWF file includes a version 2 component, use the version 2 component's
DepthManager class instead of the
MovieClip.getNextHighestDepth()
method, which is
used in this example.
See also
addListener (MovieClipLoader.addListener method)
,
loadClip
(MovieClipLoader.loadClip method)
,
onLoadStart (MovieClipLoader.onLoadStart
event listener)
onLoadProgress (MovieClipLoader.onLoadProgress
event listener)
onLoadProgress = function([target_mc:MovieClip], loadedBytes:Number,
totalBytes:Number) {}
Invoked every time the loading content is written to the hard disk during the loading process
(that is, between
MovieClipLoader.onLoadStart
and
MovieClipLoader.onLoadComplete
). Call this listener on a listener object that you add by
using
MovieClipLoader.addListener()
. You can use this method to display information
about the progress of the download, by using the
loadedBytes
and
totalBytes
parameters.
The value for
target_mc
identifies the movie clip for which this call is being made. This is
useful when you are loading multiple files with the same set of listeners.
Availability:
ActionScript 1.0; Flash Player 7
Parameters
target_mc
:MovieClip
[optional] - A movie clip loaded by the
MovieClipLoader.loadClip()
method.
loadedBytes
:Number
- The number of bytes that had been loaded when the listener was
invoked.
NO
T
E
If you attempt to use onloadProgress in test mode with a local file that resides on your
hard disk, it does not work properly because, in test mode, Flash Player loads local files
in their entirety.
Содержание FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Страница 1: ...ActionScript 2 0 Language Reference ...
Страница 1352: ...1352 ActionScript classes ...