Saturday, April 7, 2007

Code To Load The External SWF File

Since our project will be done totally in Flash and there're a lot of swf movies and stuff, we should think about a better way to manage all the files properly. It's hard to mix all the swf together, I've found the below coding to combine all the small swf files:

var mcl:MovieClipLoader = new MovieClipLoader();

var mclL:Object = new Object();

mclL.onLoadInit = function() {
loader._visible = false;
loader.percent.text = "";
}

mcl.addListener(mclL);

mcl.loadClip("swf1.swf",holder);

No comments: