[問題] 使用bit101元件出的警告訊息

看板Flash作者 (o(‧"‧)o)時間14年前 (2011/04/30 21:21), 編輯推噓0(004)
留言4則, 2人參與, 最新討論串1/1
請問有人使用過bit 101的compoents嗎 http://www.minimalcomps.com/oldsite/ 我使用Flash CS4 SDK 3.5 版本 compile出來會有警告訊息為 Warning: 1090: Migration issue: The onMouseUp event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( 'mouseUp', callback_handler). 請問這該如何解決呢 程式只是把測試他的元件把按鈕new 出來而已 試用每個不同元件都會出現這個訊息 謝謝<_ _> -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.63.97.32

04/30 22:41, , 1F
你的文章裡就有提到解決方法囉 :)
04/30 22:41, 1F

04/30 22:42, , 2F
第2行後半段 You must....using addEventListener
04/30 22:42, 2F
你好 我有加addEventListener 我使用兩種方式都一樣會出現 不知是否哪裡出問題 謝謝你 我把public class內的show出來 public class testbit extends Sprite { private var _btn:PushButton; public function testbit() { _btn = new PushButton(this, 100, 100, 'test',btnhandle); } private function btnhandle(e:Event) { trace(e); } } //這種是直接用PushButton裡第五個參數function來試 ==================== 下面是加有addEventListener的 public class testbit extends Sprite { private var _btn:PushButton; public function testbit() { _btn = new PushButton(this, 100, 100, 'test'); _btn.addEventListener(MouseEvent.MOUSE_DOWN, btnhandle); } private function btnhandle(e:MouseEvent) { trace(e); } } ※ 編輯: bruce620 來自: 61.63.97.32 (04/30 23:11)

04/30 23:18, , 3F
附fla+AS吧,這樣很難猜
04/30 23:18, 3F
as就跟上面一樣 囧 原始碼和FLA http://ppt.cc/nx~q 謝謝 ※ 編輯: bruce620 來自: 61.63.97.32 (05/01 10:24)

05/03 21:16, , 4F
文章代碼(AID): #1Dl0pP6e (Flash)