EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 549

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
MovieClipLoader.loadClip() 549
//Second set of listeners
var another_mcl = new MovieClipLoader();
myListener2 = new Object();
myListener2.onLoadStart = function (target_mc)
{
myTrace("*********Second my_mcl instance*********");
myTrace ("Your load has begun on movie clip22 . = " + target_mc);
var loadProgress = my_mcl.getProgress(target_mc);
myTrace(loadProgress.bytesLoaded + " = bytes loaded at start" );
myTrace(loadProgress.bytesTotal + " = bytes total at start");
}
myListener2.onLoadComplete = function (target_mc)
{
myTrace ("*********Second my_mcl instance*********");
myTrace ("Your load is done on movie clip = " + target_mc);
var loadProgress = my_mcl.getProgress(target_mc);
myTrace(loadProgress.bytesLoaded + " = bytes loaded at end");
myTrace(loadProgress.bytesTotal + " = bytes total at end" );
}
myListener2.onLoadError = function (target_mc, errorCode)
{
myTrace ("*********Second my_mcl instance*********");
myTrace ("ERROR CODE = " + errorCode);
myTrace ("Your load failed on movie clip = " + target_mc + "\n");
}
another_mcl.addListener(myListener2);
//Now load the files into their targets (using the second instance of
MovieClipLoader)
another_mcl.loadClip("http://www.somedomain.somewhere.com/yetAnotherFile.jpg",
_root.myMC4);
// Issue the following statements after the download is complete,
// and after my_mcl.onLoadInit has been called.
// my_mcl.removeListener(myListener)
// my_mcl.removeListener(myListener2)
See also
MovieClipLoader.unloadClip()

Table of Contents

Related product manuals