//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()
MovieClipLoader.loadClip()
549
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?