After painstaking (and “successful”) effort to follow this Kirupa external preloader tutorial precisely (http://www.kirupa.com/developer/actionscript/moviecliploader.htm), I’m experiencing an interesting problem:
it “almost” works from within Flash (when publishing/viewing via CTRL+Enter) in that the preloader loads the main clip, but the status element (% loaded) of the loading process is nowhere to be seen. (I understand that such status viewing may require uploading the file–but read on.)
when viewing the .swf file from within a local webpage, it doesn’t work at all: the preloader .swf is there (with no loader bar, mind you), but it does not load the main clip.
after uploading all, and triple-checking the code, the experience is no different from on the local site (i.e. no status bar, no loaded main clip).
all i’ve done different from the tutorial is substitute a .swf for a .jpg and gotten rid of the buttons (which shouldn’t matter).
i’ve searched posts for feedback specific to this tutorial to no avail. has anyone made this work correctly? what may i be doing wrong?
-thx for any help (sorry for all the blather). below is my code.
MovieClip.prototype.fadeIn = function() {
this.onEnterFrame = function() {
if (this._alpha<100) {
this._alpha += 10;
} else {
delete this.onEnterFrame;
}
};
};
bar._visible = false;
border._visible = false;
var empty = this.createEmptyMovieClip(“container”, “100”);
empty._x = 0;
empty._y = 0;
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
container._alpha = 0;
bar._visible = true;
border._visible = true;
pText._visible = true;
};
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
bar._width = (lBytes/tBytes)*100;
pText.text = “% “+Math.round((lBytes/tBytes)*100);
};
preload.onLoadComplete = function(targetMC) {
container.fadeIn();
border._visible = false;
bar._visible = false;
pText._visible = false;
trace(targetMC+” finished”);
};
//load clip
my_mc.loadClip(“fm_davevid_new.swf”, “container”);