package flash023{
import flash.display.Loader;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flash.filters.ConvolutionFilter;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.net.URLLoaderDataFormat;
import flash.utils.ByteArray;
/**
* ...
* @author FLASH023
*/
public class Main extends Sprite{
private var loader:URLLoader;
private var load_num:uint;
public function Main():void{
loadSWFBa("swf/as3.swf");
}
private function loadSWFBa(_path:String ):void{
loader = new URLLoader;
loader.dataFormat=URLLoaderDataFormat.BINARY ;
loader.addEventListener (Event.COMPLETE , baComplete);
loader.load(new URLRequest (_path));
}
private function baComplete(_evt:Event):void {
var _ba:ByteArray = _evt.target.data as ByteArray;
var _total:uint = 4;//复制四个
while(_total--){
var _loader:Loader = new Loader;
_loader.loadBytes (_ba);
_loader.contentLoaderInfo.addEventListener (Event.COMPLETE, loadComplete);
}
//-------------------
loader.removeEventListener (Event.COMPLETE , baComplete);
loader = null;
}
private function loadComplete(_evt:Event):void {
var _mc:MovieClip = _evt.target.content as MovieClip;
_mc.x = load_num % 2 * 300;
_mc.y = uint(load_num / 2) * 220;
load_num++;
addChild (_mc);
}
}
}
复制多个loader
最新推荐文章于 2016-03-25 20:55:18 发布
部署运行你感兴趣的模型镜像
您可能感兴趣的与本文相关的镜像
Stable-Diffusion-3.5
图片生成
Stable-Diffusion
Stable Diffusion 3.5 (SD 3.5) 是由 Stability AI 推出的新一代文本到图像生成模型,相比 3.0 版本,它提升了图像质量、运行速度和硬件效率
2610

被折叠的 条评论
为什么被折叠?



