(Moviecliploader.onloadprogress Event Listener) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

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 is loaded into a movie clip created at runtime:
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);
See also
addListener (MovieClipLoader.addListener method)
(MovieClipLoader.loadClip method)
event listener)
onLoadProgress (MovieClipLoader.onLoadProgress
event listener)
onLoadProgress = function([target_mc], loadedBytes, totalBytes) {}
Invoked every time the loading content is written to disk during the loading process (that is,
between
MovieClipLoader.onLoadStart
this listener on a listener object that you add using
can use this method to display information about the progress of the download, using the
and
loadedBytes
totalBytes
The value for
target_mc
you are loading multiple files with the same set of listeners.
Note: If you attempt to use
on your hard disk, it will not work properly because, in test movie mode, Flash Player loads
local files in their entirety.
,
onLoadStart (MovieClipLoader.onLoadStart
and
parameters.
identifies the movie clip this call is being made for. This is useful if
in test movie mode with a local file that resides
onLoadProgress
,
loadClip
MovieClipLoader.onLoadComplete
MovieClipLoader.addListener()
). Call
. You
MovieClipLoader
539

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Table of Contents