I need to be able to preload multiple .swf’s while a movie is running. These files will later be called and placed into an empty movie clip. Here’s what I’ve come up with…
var loader:MovieClipLoader = new MovieClipLoader();
var loadListener:Object = new Object();
loadListener.onLoadStart = function(target_mc) {
trace("loading...");
};
loadListener.onLoadInit = function(target_mc) {
_root.emptyclip._visible = false;
};
loadListener.onLoadComplete = function(target_mc) {
_root.play();
};
loadListener.onLoadError = function(target_mc) {
trace("doh!");
};
loader.addListener(loadListener);
loader.loadClip("1a.swf", _root.emptyclip);
loader.loadClip("2.swf", _level20);
loader.loadClip("3.swf", _level30);
loader.loadClip("4.swf", _level40);
loader.loadClip("5.swf", _level50);
loader.loadClip("5b.swf", _level60);
loader.loadClip("5c.swf", _level70);
loader.loadClip("6.swf", _level80);
loader.loadClip("7.swf", _level90);
stop();
Not only does this not work, but nothing traces at all. I’ve gotta say, I’m at a loss.