634
Chapter 7: ActionScript for Flash
Parameters
listenerObject
An object that listens for a callback notification from the MovieClipLoader
event handlers.
Returns
Nothing.
Description
Method; registers an object to receive notification when a MovieClipLoader event handler
is invoked.
Example
The following example loads an image into a movie clip called
image_mc
. The movie clip 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.macromedia.com/images/shared/product_boxes/
112x112/box_studio_112x112.jpg", image_mc);
See also
MovieClipLoader.onLoadComplete
,
MovieClipLoader.onLoadError
,
MovieClipLoader.onLoadInit
,
MovieClipLoader.onLoadProgress
,
MovieClipLoader.onLoadStart
,
MovieClipLoader.removeListener()
MovieClipLoader.getProgress()
Availability
Flash Player 7.
Usage
my_mcl
.getProgress(
target_mc:Object
)
: Object
Parameters
target_mc
A SWF or JPEG file that is loaded using
MovieClipLoader.loadClip()
.
Содержание FLEX-FLEX ACTIONSCRIPT LANGUAGE
Страница 1: ...Flex ActionScript Language Reference...
Страница 8: ......
Страница 66: ...66 Chapter 2 Creating Custom Classes with ActionScript 2 0...
Страница 76: ......
Страница 133: ...break 133 See also for for in do while while switch case continue throw try catch finally...
Страница 135: ...case 135 See also break default strict equality switch...
Страница 146: ...146 Chapter 5 ActionScript Core Language Elements See also break continue while...
Страница 229: ...while 229 i 3 The following result is written to the log file 0 3 6 9 12 15 18 See also do while continue for for in...
Страница 808: ...808 Chapter 7 ActionScript for Flash...
Страница 810: ...810 Appendix A Deprecated Flash 4 operators...
Страница 815: ...Other keys 815 Num Lock 144 186 187 _ 189 191 192 219 220 221 222 Key Key code...
Страница 816: ...816 Appendix B Keyboard Keys and Key Code Values...
Страница 822: ...822 Index...