MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 947

Actionscript 2.0 language reference
Table of Contents

Advertisement

Parameters
- An object that listens for a callback notification from the
listener:Object
event handlers.
MovieClipLoader
Returns
- A Boolean value. Returns
Boolean
otherwise
.
false
Example
The following example loads an image into a movie clip called
instance is rotated and centered on the Stage, and both the Stage and movie clip have a stroke
drawn around their perimeters.
this.createEmptyMovieClip("image_mc", this.getNextHighestDepth());
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
target_mc._x = Stage.width/2-target_mc._width/2;
target_mc._y = Stage.height/2-target_mc._width/2;
var w:Number = target_mc._width;
var h:Number = target_mc._height;
target_mc.lineStyle(4, 0x000000);
target_mc.moveTo(0, 0);
target_mc.lineTo(w, 0);
target_mc.lineTo(w, h);
target_mc.lineTo(0, h);
target_mc.lineTo(0, 0);
target_mc._rotation = 3;
};
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
onLoadComplete (MovieClipLoader.onLoadComplete event listener)
(MovieClipLoader.onLoadError event listener)
(MovieClipLoader.onLoadInit event listener)
(MovieClipLoader.onLoadProgress event listener)
(MovieClipLoader.onLoadStart event listener)
(MovieClipLoader.removeListener method)
if the listener was established successfully;
true
MovieClip.getNextHighestDepth()
,
,
onLoadProgress
,
. The movie clip
image_mc
method, which is
onLoadInit
,
onLoadStart
removeListener
MovieClipLoader
,
onLoadError
947

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