Re: [問題] load進來的圖片大小

看板Flash作者 (72727)時間13年前 (2011/12/01 22:16), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/4 (看更多)
: ※ 引述《hirabbitt (兔子)》之銘言: : ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,function(E:Event):void{ : trace("today test"); : trace(ldr.contentLoaderInfo.width); : }); : /* : 輸出: : today test : Error: Error #2099: 正在載入的物件載入不充分,不足以提供此資訊。。 : at flash.display::LoaderInfo/get width() : at MethodInfo-721() : */ : 為什麼呢 : 我都已經用Event.COMPLETE了... 1.ldr是什麼 contentLoaderInfo 剛剛Goo了一下 http://blog.xuite.net/ljs.ctk/multimedia/20408349 我覺得這個應該就能搞清楚你的ldr是要用啥了. 我直覺是覺得你要抓的是載入後的資訊 2.e.currenttarget和e.target的用意不同 e.target指向的是事件發生的目標資訊 e.currenttarget指的是此目標-->包含此事件目標的本體 通常省麻煩就是用e.currenttarget丟給一個Object去找你要的值 ----學一個月不到 還在練習中 請多指正錯誤觀念 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.171.49.73 ※ 編輯: darkness0727 來自: 118.171.49.73 (12/01 22:18)
文章代碼(AID): #1ErummmB (Flash)
文章代碼(AID): #1ErummmB (Flash)