Properties | Events | Methods |
Object
Player version: | Flash Player 7 |
MovieClipLoader.loadClip()
instead of loadMovie()
or MovieClip.loadMovie()
to load SWF files. After you issue the MovieClipLoader.loadClip()
command, the following events take place in the order listed:
MovieClipLoader.onLoadStart
listener is invoked.MovieClipLoader.onLoadProgress
listener, it is invoked during the loading process.MovieClipLoader.getProgress()
at any time during the load process.MovieClipLoader.onLoadComplete
listener is invoked.MovieClipLoader.onLoadInit
listener is invoked.When MovieClipLoader.onLoadInit
has been invoked, you can set properties, use methods, and otherwise interact with the loaded movie.
If the file fails to load completely, the MovieClipLoader.onLoadError
listener is invoked.
Property Summary |
Properties inherited from class Object |
__proto__, __resolve, constructor, prototype |
Event Summary | |
onLoadComplete = function([target_mc:MovieClip], [httpStatus:Number]) {}
Invoked when a file that was loaded with MovieClipLoader.loadClip() is completely downloaded. |
|
onLoadError = function(target_mc:MovieClip, errorCode:String, [httpStatus:Number]) {}
Invoked when a file loaded with MovieClipLoader.loadClip() has failed to load. |
|
onLoadInit = function([target_mc:MovieClip]) {}
Invoked when the actions on the first frame of the loaded clip have been executed. |
|
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 ). |
|
onLoadStart = function([target_mc:MovieClip]) {}
Invoked when a call to MovieClipLoader.loadClip() has begun to download a file. |
Constructor Summary | |
MovieClipLoader()
Creates a MovieClipLoader object that you can use to implement a number of listeners to respond to events while a SWF, JPEG, GIF, or PNG file is downloading. |
Method Summary | |
| addListener(listener:Object) : Boolean
Registers an object to receive notification when a MovieClipLoader event handler is invoked. |
| getProgress(target:Object) : Object
Returns the number of bytes loaded and the total number of bytes of a file that is being loaded by using MovieClipLoader.loadClip() ; for compressed movies, returns the number of compressed bytes. |
| loadClip(url:String, target:Object) : Boolean
Loads a SWF, JPEG, progressive JPEG, unanimated GIF, or PNG file into a movie clip in Flash Player while the original movie is playing. |
| removeListener(listener:Object) : Boolean
Removes the listener that was used to receive notification when a MovieClipLoader event handler was invoked. |
| unloadClip(target:Object) : Boolean
Removes a movie clip that was loaded by using MovieClipLoader.loadClip() . |
Methods inherited from class Object |
addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toString, unwatch, valueOf, watch |
Event Detail |
public onLoadComplete = function([target_mc:MovieClip], [httpStatus:Number]) {}
Player version: | Flash Player 7 — Support for unanimated GIF files, PNG files, and progressive JPEG files is available as of Flash Player 8. |
MovieClipLoader.loadClip()
is completely downloaded. Call this listener on a listener object that you add using MovieClipLoader.addListener()
. The onLoadComplete
event listener is passed by Flash Player to your code, but you do not have to implement all of the parameters in the listener function. The value for target_mc
identifies the movie clip for which this call is being made. This identification is useful when multiple files are being loaded with the same set of listeners. In Flash Player 8, this listener can return an HTTP status code. If Flash Player cannot get the status code from the server, or if Flash Player cannot communicate with the server, the default value of 0 is passed to your ActionScript code. A value of 0 can be generated in any player (for example, if a malformed URL is requested), and a value of 0 is always generated by the Flash Player plug-in when run in the following browsers, which cannot pass HTTP status codes from the server to Flash Player: Netscape, Mozilla, Safari, Opera, and Internet Explorer for the Macintosh.
It's important to understand the difference between MovieClipLoader.onLoadComplete
and MovieClipLoader.onLoadInit
. The onLoadComplete
event is called after the SWF, JPEG, GIF, or PNG file loads, but before the application is initialized. At this point, it is impossible to access the loaded movie clip's methods and properties, and therefore you cannot call a function, move to a specific frame, and so on. In most situations, it's better to use the onLoadInit
event instead, which is called after the content is loaded and fully initialized.
target_mc:MovieClip [optional] — A movie clip loaded by the MovieClipLoader.loadClip() method. |
|
httpStatus:Number [optional] — (Flash Player 8 only) The HTTP status code returned by the server. For example, a status code of 404 indicates that the server has not found anything matching the requested URI. For more information about HTTP status codes, see sections 10.4 and 10.5 of the HTTP specification at ftp://ftp.isi.edu/in-notes/rfc2616.txt. |
MovieClipLoader
instance, and an anonymous event listener which listens for the onLoadComplete
event but waits for an onLoadInit
event to interact with the loaded element properties. var loadListener:Object = new Object(); loadListener.onLoadComplete = function(target_mc:MovieClip, httpStatus:Number):Void { trace(">> loadListener.onLoadComplete()"); trace(">> ============================="); trace(">> target_mc._width: " + target_mc._width); // 0 trace(">> httpStatus: " + httpStatus); } loadListener.onLoadInit = function(target_mc:MovieClip):Void { trace(">> loadListener.onLoadInit()"); trace(">> ============================="); trace(">> target_mc._width: " + target_mc._width); // 315 } var mcLoader:MovieClipLoader = new MovieClipLoader(); mcLoader.addListener(loadListener); var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth()); mcLoader.loadClip("http://www.w3.org/Icons/w3c_main.png", 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.
MovieClipLoader.addListener(), MovieClipLoader.loadClip(), MovieClipLoader.onLoadStart, MovieClipLoader.onLoadError, MovieClipLoader.onLoadInit |
public onLoadError = function(target_mc:MovieClip, errorCode:String, [httpStatus:Number]) {}
Player version: | Flash Player 7 |
MovieClipLoader.loadClip()
has failed to load. This listener can be invoked for various reasons; for example, if the server is down, the file is not found, or a security violation occurs. Call this listener on a listener object that you add by using MovieClipLoader.addListener()
.
The value of target_mc
identifies the movie clip for which this call is being made. This parameter is useful if you are loading multiple files with the same set of listeners.
For the errorCode
parameter, the string "URLNotFound"
is returned if neither the MovieClipLoader.onLoadStart
or MovieClipLoader.onLoadComplete
listener has been called; for example, if a server is down or the file is not found. The string "LoadNeverCompleted"
is returned if MovieClipLoader.onLoadStart
was called but MovieClipLoader.onLoadComplete
was not called; for example, if the download was interrupted because of server overload, server crash, and so on.
In Flash Player 8, this listener can return an HTTP status code in the httpStatus
parameter. If Flash Player cannot get a status code from the server, or if Flash Player cannot communicate with the server, the default value of 0 is passed to your ActionScript code. A value of 0 can be generated in any player (for example, if a malformed URL is requested), and a value of 0 is always generated by the Flash Player plug-in when run in the following browsers, which cannot pass HTTP status codes from the server to Flash Player: Netscape, Mozilla, Safari, Opera, and Internet Explorer for the Macintosh. A value of 0 can also be generated if the player did not try to make the URL request to perform the load operation. This can happen because the request violates security sandbox rules for the SWF file.
target_mc:MovieClip — A movie clip loaded by the MovieClipLoader.loadClip() method. |
|
errorCode:String — A string that explains the reason for the failure, either "URLNotFound" or "LoadNeverCompleted" . |
|
httpStatus:Number [optional] — (Flash Player 8 only) The HTTP status code returned by the server. For example, a status code of 404 indicates that the server has not found anything that matches the requested URI. For more information about HTTP status codes, see sections 10.4 and 10.5 of the HTTP specification at ftp://ftp.isi.edu/in-notes/rfc2616.txt. |
var loadListener:Object = new Object(); loadListener.onLoadError = function(target_mc:MovieClip, errorCode:String, httpStatus:Number) { trace(">> loadListener.onLoadError()"); trace(">> =========================="); trace(">> errorCode: " + errorCode); trace(">> httpStatus: " + httpStatus); } var mcLoader:MovieClipLoader = new MovieClipLoader(); mcLoader.addListener(loadListener); var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth()); mcLoader.loadClip("http://www.fakedomain.com/images/bad_hair_day.jpg", 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.
MovieClipLoader.addListener(), MovieClipLoader.loadClip(), MovieClipLoader.onLoadStart, MovieClipLoader.onLoadComplete |
public onLoadInit = function([target_mc:MovieClip]) {}
Player version: | Flash Player 7 |
MovieClipLoader.addListener()
. The value for target_mc
identifies the movie clip for which this call is being made. This parameter is useful if you are loading multiple files with the same set of listeners.
target_mc:MovieClip [optional] — A movie clip loaded by the MovieClipLoader.loadClip() method. |
image_mc
. The onLoadInit
and onLoadComplete
events are used to determine how long it takes to load the image. This information is displayed in a text field called timer_txt
. 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);
The following example checks whether a movie has loaded into a movie clip created at runtime. The URL used in this example is for demonstration purposes only; replace it with your own valid URL.
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.
MovieClipLoader.addListener(), MovieClipLoader.loadClip(), MovieClipLoader.onLoadStart |
public onLoadProgress = function([target_mc:MovieClip], loadedBytes:Number, totalBytes:Number) {}
Player version: | Flash Player 7 |
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.
Note: 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.
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. |
|
totalBytes:Number — The total number of bytes in the file being loaded. |
MovieClipLoader
instance, and an anonymous event listener. It periodically outputs the progress of a load and finally provides notification when the load is complete and the asset is available to ActionScript. var container:MovieClip = this.createEmptyMovieClip("container", this.getNextHighestDepth()); var mcLoader:MovieClipLoader = new MovieClipLoader(); var listener:Object = new Object(); listener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void { trace(target + ".onLoadProgress with " + bytesLoaded + " bytes of " + bytesTotal); } listener.onLoadInit = function(target:MovieClip):Void { trace(target + ".onLoadInit"); } mcLoader.addListener(listener); mcLoader.loadClip("http://www.w3.org/Icons/w3c_main.png", container);
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.
MovieClipLoader.addListener(), MovieClipLoader.loadClip(), MovieClipLoader.getProgress() |
public onLoadStart = function([target_mc:MovieClip]) {}
Player version: | Flash Player 7 |
MovieClipLoader.loadClip()
has begun to download a file. Call this listener on a listener object that you add by using MovieClipLoader.addListener()
. The value for target_mc
identifies the movie clip for which this call is being made. This parameter is useful if you are loading multiple files with the same set of listeners.
target_mc:MovieClip [optional] — A movie clip loaded by the MovieClipLoader.loadClip() method. |
image_mc
. The onLoadInit
and onLoadComplete
events are used to determine how long it takes to load the image. This information is displayed in a text field called timer_txt
. 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 MovieClip.getNextHighestDepth()
method, which is used in this example.
MovieClipLoader.addListener(), MovieClipLoader.loadClip(), MovieClipLoader.onLoadError, MovieClipLoader.onLoadInit, MovieClipLoader.onLoadComplete |
Constructor Detail |
public MovieClipLoader()
Player version: | Flash Player 7 |
MovieClipLoader.loadClip()
.
See also
MovieClipLoader.addListener(), MovieClipLoader.loadClip() |
Method Detail |
public addListener(listener:Object) : Boolean
Player version: | Flash Player 7 |
MovieClipLoader
event handler is invoked.
Parameters
listener:Object — An object that listens for a callback notification from the MovieClipLoader event handlers. |
Boolean —
A Boolean value. Returns true if the listener was established successfully; otherwise false .
|
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.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 MovieClip.getNextHighestDepth()
method, which is used in this example.
MovieClipLoader.onLoadComplete, MovieClipLoader.onLoadError, MovieClipLoader.onLoadInit, MovieClipLoader.onLoadProgress, MovieClipLoader.onLoadStart, MovieClipLoader.removeListener() |
public getProgress(target:Object) : Object
Player version: | Flash Player 7 |
MovieClipLoader.loadClip()
; for compressed movies, returns the number of compressed bytes. The getProgress
method lets you explicitly request this information, instead of (or in addition to) writing a MovieClipLoader.onLoadProgress
listener function.
Parameters
target:Object — A SWF, JPEG, GIF, or PNG file that is loaded by using MovieClipLoader.loadClip() . |
Object —
An object that has two integer properties: bytesLoaded and bytesTotal .
|
getProgress()
method. Rather than using this method, you will usually create a listener object to listen for the onLoadProgress
event. Also note that the first, synchronous call to getProgress()
can return the number of bytes loaded and the total number of bytes of the container and not the values for the externally requested object. var container:MovieClip = this.createEmptyMovieClip("container", this.getNextHighestDepth()); var image:MovieClip = container.createEmptyMovieClip("image", container.getNextHighestDepth()); var mcLoader:MovieClipLoader = new MovieClipLoader(); var listener:Object = new Object(); listener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void { trace(target + ".onLoadProgress with " + bytesLoaded + " bytes of " + bytesTotal); } mcLoader.addListener(listener); mcLoader.loadClip("http://www.w3.org/Icons/w3c_main.png", image); var interval:Object = new Object(); interval.id = setInterval(checkProgress, 100, mcLoader, image, interval); function checkProgress(mcLoader:MovieClipLoader, image:MovieClip, interval:Object):Void { trace(">> checking progress now with : " + interval.id); var progress:Object = mcLoader.getProgress(image); trace("bytesLoaded: " + progress.bytesLoaded + " bytesTotal: " + progress.bytesTotal); if(progress.bytesLoaded == progress.bytesTotal) { clearInterval(interval.id); } }
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.
MovieClipLoader.loadClip(), MovieClipLoader.onLoadProgress |
public loadClip(url:String, target:Object) : Boolean
Player version: | Flash Player 7 — Support for unanimated GIF files, PNG files, and progressive JPEG files is available as of Flash Player 8. |
Using the loadClip()
method instead of loadMovie()
or MovieClip.loadMovie()
has a number of advantages. The following handlers are implemented by the use of a listener object. You activate the listener by registering it with the MovieClipLoader class by using MovieClipLoader.addListener(listenerObject)
.
MovieClipLoader.onLoadStart
handler is invoked when loading begins.MovieClipLoader.onLoadError
handler is invoked if the clip cannot be loaded. MovieClipLoader.onLoadProgress
handler is invoked as the loading process progresses. MovieClipLoader.onLoadComplete
handler is invoked when a file completes downloading, but before the loaded movie clip's methods and properties are available. This handler is called before the onLoadInit
handler.MovieClipLoader.onLoadInit
handler is invoked after the actions in the first frame of the clip have executed, so you can begin manipulating the loaded clip. This handler is called after the onLoadComplete
handler. For most purposes, use the onLoadInit
handler.A SWF file or image loaded into a movie clip inherits the position, rotation, and scale properties of the movie clip. You can use the target path of the movie clip to target the loaded movie.
You can use the loadClip()
method to load one or more files into a single movie clip or level; MovieClipLoader listener objects are passed to the loading target movie clip instance as parameters. Alternatively, you can create a different MovieClipLoader object for each file that you load.
Use MovieClipLoader.unloadClip()
to remove movies or images loaded with this method or to cancel a load operation that is in progress.
MovieClipLoader.getProgress()
and MovieClipLoaderListener.onLoadProgress
do not report the actual bytesLoaded
and bytesTotal
values in the authoring player when the files are local. When you use the Bandwidth Profiler feature in the authoring environment, MovieClipLoader.getProgress()
and MovieClipLoaderListener.onLoadProgress
report the download at the actual download rate, not at the reduced bandwidth rate that the Bandwidth Profiler provides.
When using this method, consider the Flash Player security model.
For Flash Player 8:
For Flash Player 7 and later:
System.security.allowDomain()
method to adjust these restrictions. For more information, see the following:
url:String — The absolute or relative URL of the SWF, JPEG, GIF, or PNG file to be loaded. A relative path 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. |
|
target:Object — The target path of a movie clip, or an integer specifying the level in Flash Player into which the movie will be loaded. The target movie clip is replaced by the loaded SWF file or image. |
Boolean —
A Boolean value. Returns true if the URL request was sent successfully; otherwise false .
|
MovieClipLoader.loadClip()
method by creating a handler for the onLoadInit
event and then making the request. You should either place the following code directly into a frame action on a Timeline, or paste it into a class that extends MovieClip. This code also expects an image named YourImage.jpg to exist in the same directory as the compiled SWF file.
var container:MovieClip = createEmptyMovieClip("container", getNextHighestDepth()); var mcLoader:MovieClipLoader = new MovieClipLoader(); mcLoader.addListener(this); mcLoader.loadClip("YourImage.jpg", container); function onLoadInit(mc:MovieClip) { trace("onLoadInit: " + 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.
MovieClipLoader.onLoadInit |
public removeListener(listener:Object) : Boolean
Player version: | Flash Player 7 |
MovieClipLoader
event handler was invoked. No further loading messages will be received.
Parameters
listener:Object — A listener object that was added by using MovieClipLoader.addListener() . |
Boolean —
A Boolean value. Returns true if the listener was removed successfully; otherwise false .
|
start_button
and stop_button
. When the user starts or stops the progress, information is displayed in the Output panel.When the user starts or stops the progress, information writes to the log file. this.createEmptyMovieClip("image_mc", this.getNextHighestDepth()); var mclListener:Object = new Object(); mclListener.onLoadStart = function(target_mc:MovieClip) { trace("\t onLoadStart"); }; mclListener.onLoadComplete = function(target_mc:MovieClip) { trace("\t onLoadComplete"); }; mclListener.onLoadError = function(target_mc:MovieClip, errorCode:String) { trace("\t onLoadError: "+errorCode); }; mclListener.onLoadInit = function(target_mc:MovieClip) { trace("\t onLoadInit"); start_button.enabled = true; stop_button.enabled = false; }; var image_mcl:MovieClipLoader = new MovieClipLoader(); // start_button.clickHandler = function() { trace("Starting..."); start_button.enabled = false; stop_button.enabled = true; // image_mcl.addListener(mclListener); image_mcl.loadClip("http://www.helpexamples.com/flash/images/image1.jpg", image_mc); }; stop_button.clickHandler = function() { trace("Stopping..."); start_button.enabled = true; stop_button.enabled = false; // image_mcl.removeListener(mclListener); }; stop_button.enabled = false;
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.
MovieClipLoader.addListener() |
public unloadClip(target:Object) : Boolean
Player version: | Flash Player 7 |
MovieClipLoader.loadClip()
. If you issue this command while a movie is loading, MovieClipLoader.onLoadError
is invoked.
Parameters
target:Object — The string or integer that is passed to the corresponding call to my_mcl.loadClip() . |
Boolean —
A Boolean value. Returns true if the movie clip was removed successfully; otherwise false .
|
image_mc
. When you click the movie clip, the movie clip is removed and information is displayed in the Output panel.When you click the movie clip, the movie clip is removed and information writes to the log file. this.createEmptyMovieClip("image_mc", this.getNextHighestDepth()); var mclListener:Object = new Object(); mclListener.onLoadInit = function(target_mc:MovieClip) { target_mc._x = 100; target_mc._y = 100; target_mc.onRelease = function() { trace("Unloading clip..."); trace("\t name: "+target_mc._name); trace("\t url: "+target_mc._url); image_mcl.unloadClip(target_mc); }; }; 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 MovieClip.getNextHighestDepth()
method, which is used in this example.
MovieClipLoader.loadClip(), MovieClipLoader.onLoadError |
Properties | Events | Methods |