Hello. I used the resuable preloader in one of my projects lately. The code used is as follows:
[LEFT]bar._visible = false;
this.createEmptyMovieClip(“container”, “100”);
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
container._visible = false;
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._visible = true;
bar._visible = false;
pText._visible = false;
trace(targetMC+" finished");
};
//default image
my_mc.loadClip(“news.swf”, “container”);
//buttons
button1.onPress = function() {
my_mc.loadClip(“news.swf”, “container”);
};
button2.onPress = function() {
my_mc.loadClip(“kills.swf”, “container”);
};
button3.onPress = function() {
my_mc.loadClip(“picture3.jpg”, “container”);
};
[/LEFT]
so I am preloading .swf instead of simple pictures, which is fine. Although… I have the menu included in the SWF’s that I load so I dont know to edit the events on the code above to match those objects. (The code above is included in main.swf: the file that includes the preloader, and navigation menus are on news or killls.swf) Please help me out :wasted: