package {
import flash.display.Sprite;
import flash.display.Loader;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.utils.ByteArray;
import flash.net.URLLoaderDataFormat;
import flash.events.Event;
import flash.events.ProgressEvent;
public class dqw extends Sprite {
private var main_bytearray:ByteArray;
public function dqw() {
var _request:URLRequest=new URLRequest("ink4.swf");
var _loader:URLLoader=new URLLoader ;
_loader.dataFormat=URLLoaderDataFormat.BINARY;
_loader.addEventListener(Event.COMPLETE,LoadComplete);
_loader.load(_request);
}
public function LoadComplete(evt:Event):void {
var bin_loader:Loader=new Loader ;
main_bytearray=evt.target.data as ByteArray;//它可以多次使用,不需要再次加载了
bin_loader.loadBytes(main_bytearray);
addChild(bin_loader);
}
}
}