作者sledogerunir (隐密忍者农丸)
看板Flash
标题[问题]as3.0抓取外部图片的宽高...
时间Fri Feb 13 17:44:25 2009
function tLoaded(evt:Event) {
tXML=XML(tLoader.data);
var num:uint=tXML.pics.menu.length();
for (var i:uint=0; i<num; i++) {
var _mc:MovieClip=this.getChildByName("p"+i) as MovieClip;
var picUrl:String=tXML.pics.menu[i].attribute("url");
var NN:URLRequest=new URLRequest("theme/2002_hugo/"+picUrl);
var LL:Loader = new Loader();
_mc= new Lod();
LL.load(NN);
trace(LL.height) <=有问题的地方~??
_mc.addChild(LL);
_mc.y = (_mc.height+20)*i;
_mc.cc_txt.text=tXML.pics.menu[i].attribute("account");
pannel_mc.pic_mc.addChild(_mc);
}
}
这是一个xml 抓取图片路径的一小段程式
基本上汇入到flash这些步骤都没问题。
不过我想抓取外部图片的高度,抓出来的数值都是0
并不是我要的图片高度
请教各位板大这个问题要怎麽处理呢?感激不尽!!!
--
Dragon in Underware 3UB
Trample.
Any man creature become 0/1 weeky chiken.
If a woman deal damage to Dragon in Underware, Dragon in Underware become 0/1 weaky chiken.
If Dragon in Underware deal damage, put many 1/1 red Ooze token into play
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.138.32.78
1F:推 pm2001:载入的东西是存在loader.content 02/13 17:46
2F:推 cjcat2266:loader.contentLoaderInfo.width/height 02/13 18:30