Onloadinit (Moviecliploader.onloadinit 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 image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip("http://www.fakedomain.com/images/bad_hair_day.jpg",
image_mc);
See also
addListener (MovieClipLoader.addListener method)
(MovieClipLoader.loadClip method)
,
event listener)
onLoadComplete (MovieClipLoader.onLoadComplete event
listener)
onLoadInit (MovieClipLoader.onLoadInit event
listener)
onLoadInit = function([target_mc]) {}
Invoked when the actions on the first frame of the loaded clip are executed. After this listener
is invoked, you can set properties, use methods, and otherwise interact with the loaded movie.
Call this listener on a listener object that you add using
The value for
target_mc
is useful if you are loading multiple files with the same set of listeners.
Parameters
target_mc: MovieClip
MovieClipLoader.loadClip()
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
[optional] - A movie clip loaded by a
target_mc:
Example
The following example loads an image into a movie clip instance called
and
onLoadInit
onLoadComplete
image. This information appears 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) {
538
ActionScript classes
,
onLoadStart (MovieClipLoader.onLoadStart
identifies the movie clip this call is being made for. This parameter
[optional] A movie clip loaded by a
method.
events are used to determine how long it takes to load the
,
loadClip
MovieClipLoader.addListener()
MovieClipLoader.loadClip()
.
timer_txt
.
method.
. The
image_mc

Advertisement

Table of Contents
loading

Table of Contents