mattquantic
Programmer
Hi I am playing with this code (from help) it works great, but I don't understand how to trace the load progress into the debug window from the listeners... Am I being really dumb? - Im just trying to trace the progress of the jpg loading...
Code:
var my_mcl = new MovieClipLoader();
myListener = new Object();
myListener.onLoadStart = function (target_mc){
var loadProgress = my_mcl.getProgress(target_mc);
myTrace(loadProgress.bytesLoaded + " = bytes loaded at start");
myTrace(loadProgress.bytesTotal + " = bytes total at start");
}
myListener.onLoadProgress = function (target_mc, loadedBytes, totalBytes){
myTrace(loadedBytes + " = bytes loaded at progress callback " );
myTrace(totalBytes + " = bytes total at progress callback \n");
}
myListener.onLoadComplete = function (target_mc){
var loadProgress = my_mcl.getProgress(target_mc);
myTrace(loadProgress.bytesLoaded + " = bytes loaded at end" );
myTrace(loadProgress.bytesTotal + " = bytes total at end=");
}
myListener.onLoadInit = function (target_mc){
target_mc._width = 341;
target_mc._width = 279;
}
myListener.onLoadError = function (target_mc, errorCode){
myTrace ("ERROR CODE = " + errorCode);
myTrace ("Your load failed on movie clip = " + target_mc + "\n");
}
my_mcl.addListener(myListener);
my_mcl.loadClip("s2k.jpg","_root.holder_mc");
my_mcl.onLoadProgress();
M@?