flash 跨域加载 二次加载

    var url2:String = "http://thirdapp0.qlogo.cn/qzopenapp/fa5d80ebf9fc89aaa1d7ddb0e1b861e58d77b409f0f85a1b/50";
                var urlrequest2:URLRequest = new URLRequest(url2);
                var lo2:Loader = new Loader();
                lo2.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e:Event):void {
                    var lo3:Loader = new Loader();
                    lo3.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e:Event):void {
                        var bmp:MovieClip = lo3.content as MovieClip ;
                        var img:Bitmap = bmp.getChildAt(0) as Bitmap;
                        temp(img);
                    });
                    var by:* = lo2.contentLoaderInfo.bytes;
                    lo3.loadBytes(lo2.contentLoaderInfo.bytes);
                });
                lo2.load(urlrequest2);

 

var url:String = "http://thirdapp0.qlogo.cn/qzopenapp/fa5d80ebf9fc89aaa1d7ddb0e1b861e58d77b409f0f85a1b/50";
                var urlrequest:URLRequest = new URLRequest(url);
                var lo:Loader = new Loader();
                lo.load(urlrequest);
                var sp:Sprite = new Sprite();
                sp.addChild(lo);
                addChild(sp);
                sp.x = 100;
                sp.y = 200;
                sp.scaleX = 1.2;
                sp.scaleY = 1.2;

 

var headUrl1:String = tradeAr[j]["user_photo"];
                    var nickInit1:String = tradeAr[j]["user_nick"];
                    var nick1:String = CutString(nickInit1, 5);
                    var money1:int = tradeAr[j]["futures_trades"];
                    var text1:TextField = txtTrades[j];
                    //text1.border = true;
                    text1.borderColor = 0x008000;
                    text1.width = 180;
                    text1.height = 110;
                    text1.htmlText = "<b>"+nick1+"</link></b><img height='80' width='80' src='"+headUrl1+"' alt=''/>";
                    text1.selectable = false;
                    text1.mouseEnabled = false;
                    addChild(text1);

 

posted @ 2013-11-08 16:46  向恺然  阅读(257)  评论(0编辑  收藏  举报

我必须说的是:我崇尚开源,但鄙视剽窃。本博客所有引用的图片,文章,和代码,均只作为研究学习使用,不作为商业应用。如果我无意中冒犯了您,请发消息留言,我将立即删除。