如何复制加载进来的swf

var urlLoader:URLLoader = new URLLoader();
urlLoader.addEventListener(Event.COMPLETE, onComplete);
urlLoader.dataFormat = URLLoaderDataFormat.BINARY;
urlLoader.load(new URLRequest("target.swf"));

function onComplete(event:Event):void
{
    var data:ByteArray = URLLoader(event.target).data;
    var swf1:Loader = new Loader();
    swf1.loadBytes(data);
    addChild(swf1);
    var swf2:Loader = new Loader();
    swf2.loadBytes(data);
    addChild(swf2)
}

  

你可能感兴趣的:(swf)