MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 959

Actionscript 2.0 language reference
Table of Contents

Advertisement

Parameters
target_mc:MovieClip
MovieClipLoader.loadClip()
Example
The following example loads an image into a movie clip instance called
and
onLoadInit
onLoadComplete
image. This information is displayed in a text field called
this.createEmptyMovieClip("image_mc", this.getNextHighestDepth());
var mclListener:Object = new Object();
mclListener.onLoadStart = function(target_mc:MovieClip) {
target_mc.startTimer = getTimer();
};
mclListener.onLoadComplete = function(target_mc:MovieClip) {
target_mc.completeTimer = getTimer();
};
mclListener.onLoadInit = function(target_mc:MovieClip) {
var timerMS:Number = target_mc.completeTimer-target_mc.startTimer;
target_mc.createTextField("timer_txt", target_mc.getNextHighestDepth(),
0, target_mc._height,
target_mc._width, 22);
target_mc.timer_txt.text = "loaded in "+timerMS+" ms.";
};
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip("http://www.helpexamples.com/flash/images/image1.jpg",
image_mc);
If your SWF file includes a version 2 component, use the version 2 component's
DepthManager class instead of the
used in this example.
See also
addListener (MovieClipLoader.addListener method)
(MovieClipLoader.loadClip method)
,
event listener)
onLoadInit (MovieClipLoader.onLoadInit event listener)
onLoadComplete (MovieClipLoader.onLoadComplete event listener)
[optional] - A movie clip loaded by the
method.
events are used to determine how long it takes to load the
MovieClip.getNextHighestDepth()
,
onLoadError (MovieClipLoader.onLoadError
image_mc
.
timer_txt
method, which is
,
loadClip
MovieClipLoader
. The
,
959

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?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF