[問題]練習寫分頁切換時 出現了錯誤

看板Flash作者 (ljm71)時間16年前 (2008/08/26 00:12), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/1
在練習寫分頁時,點擊分頁按鈕出現了錯誤訊息 但是看不懂它在寫什麼,請問它指的意思是什麼呢? 謝謝 TypeError: Error #1009: 無法存取 Null 物件參考的屬性或方法。 at _fla::MainTimeline/_fla::frame4() 影格1寫 stop(); juice_btn.addEventListener(MouseEvent.MOUSE_UP,onJuice); cake_btn.addEventListener(MouseEvent.MOUSE_UP,oncake); egg_btn.addEventListener(MouseEvent.MOUSE_UP,onegg); function onJuice(event:MouseEvent):void{ gotoAndStop(4); }; function oncake(event:MouseEvent):void{ gotoAndStop(3); }; function onegg(event:MouseEvent):void{ gotoAndStop(2); }; 影格2~4寫 juice_btn.addEventListener(MouseEvent.MOUSE_UP,onJuice); cake_btn.addEventListener(MouseEvent.MOUSE_UP,oncake); egg_btn.addEventListener(MouseEvent.MOUSE_UP,onegg); -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.169.214.222

08/26 00:35, , 1F
你第四格的egg_btn還存在嗎? 不存在的話就是null
08/26 00:35, 1F

08/26 01:24, , 2F
感謝~我查看看一下按鈕是不是更名或打錯
08/26 01:24, 2F
文章代碼(AID): #18ijd-W0 (Flash)