Synchronous loading of multiple external swf using flash
// The parameters are the number of files, the starting point x, the starting point y, the width ratio, the height ratio, and the spacing.
// The external parts are separated into 0.swf,1.swf,2.swf ...... incremental parts. In fact, the same is true for loading images.
Function manyloadmovie (num, x, y, xscal, yscal, dis ){
For (var I = 0; I <num; I ++ ){
Var temp = cr & #101; ateemptymovieclip ("temp" + I, I );
Var l = cr & #101; ateemptymovieclip ("load" + I, I + num );
Temp. t = I;
L. loadmovie (I + ". swf ");
L. _ xscale = xscal;
L. _ yscale = yscal;
L. _ x = x + I * dis;
L. _ y = y;
T = cr & #101; atetextfield ("txt" + I, I + 10000, l. _ x, l. _ y, 100,100 );
Temp. onenterframe = function (){
Var a = this. _ parent ["load" + this. t]. getbytesloaded ();
Var B = this. _ parent ["load" + this. t]. getbytestotal ();
This. _ parent ["txt" + this. t]. text = int (a * 100/B) + "% ";
If (a> = B and a> 10 ){
This. _ parent ["txt" + this. t]. removetextfield ();
This. removemovieclip ();
}
};
}
}
Manyloadmovi (4,100,100, 50, 50, 50 );