Hi everyone,
I’m working with the Reusable Preloader Using MovieClipLoader Tutorial and was able to get it to work perfectly with images but when I try to load swf’s it just shows a blank screen. Is there something I need to change to make it load the swf’s?
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;
dText._visible = false;
trace(targetMC+" finished");
};
//default image
my_mc.loadClip("slideshow1.swf", "container");
//buttons
button1.onPress = function() {
my_mc.loadClip("slideshow1.swf", "container");
};
button2.onPress = function() {
my_mc.loadClip("slideshow2.swf", "container");
};
button3.onPress = function() {
my_mc.loadClip("slideshow3.swf", "container");
};