I have followed the preloader lesson in this fab tutorial but my totalBytes value is not piking up any data. I cannot understand why this is happening. I am (99.99%) sure that the code is correct.
If you are not familiar with this tutoral it basically preloads a MC in level 50, and on loading any other MC the the preloader animation moves through the 100 frames (1 frame per 1%)
The loadedBytes is working btw.
Please help !!
__________________________________________
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myListener.onLoadProgress = function(target_mc, loadedBytes, totalBytes) {
_level50._visible = true;
var preloadPercent:Number = Math.round((loadedBytes/totalBytes)*100);
_level50.preloader.gotoAndStop(preloadPercent);
_level50.preloadInfo1.text = preloadPercent+" % Loaded";
_level150.preloadInfo2.text = Math.round(loadedBytes/1000)+" K Loaded / "+Math.round(totalBytes/1000)+" K Total";
};
myListener.onLoadComplete = function(target_mc) {
_level50._visible = false;
};
__________________________________________
If you are not familiar with this tutoral it basically preloads a MC in level 50, and on loading any other MC the the preloader animation moves through the 100 frames (1 frame per 1%)
The loadedBytes is working btw.
Please help !!
__________________________________________
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myListener.onLoadProgress = function(target_mc, loadedBytes, totalBytes) {
_level50._visible = true;
var preloadPercent:Number = Math.round((loadedBytes/totalBytes)*100);
_level50.preloader.gotoAndStop(preloadPercent);
_level50.preloadInfo1.text = preloadPercent+" % Loaded";
_level150.preloadInfo2.text = Math.round(loadedBytes/1000)+" K Loaded / "+Math.round(totalBytes/1000)+" K Total";
};
myListener.onLoadComplete = function(target_mc) {
_level50._visible = false;
};
__________________________________________