Q1.
When using the MovieClipLoader class, does it mean that I can't load files
from local address (from my hard drive)?
I have no problems loading, it's just that my preloader wouldn't work (doesn
't
scale when the movie is loading).
I'm using MX 2004
mcLoader = new MovieClipLoader();
loadListener = new Object();
mcLoader.addListener(loadListener);
mcLoader.loadClip("largeMovie.swf", loader_mc);
loadListener.onLoadStart = function() {
loader_mc.stop();
};
//this is the part where it doesn't work
loadListener.onLoadProgress = function(loadTarget, loadedBytes, totalBytes)
{
preloaded = Math.floor(loadedBytes/totalBytes*100);
loaderText_txt.text = preloaded+"% loaded into "+loadTarget;
bar_mc._xscale = preloaded;
};
loadListener.onLoadComplete = function() {
loaderText_txt._visible = false;
bar_mc._visible = false;
loader_mc.play();
};
----------------------------------------------------------------------------
----
-------
Q2.
Since I can't use the above method, I'm having a hard time trying to reuse t
he
preloader to load multiple external files.
I'm now trying a movie clip loader_mc to load my movies/jpeg. How do I get t
he
amount of bytes (of target file) loaded?
I've tried the following but I know it's wrong.
loader_mc.getBytesLoaded();
Can someone advise or give a hint?
|