《碼上就會 :Flash 8 專業版 ActionScript 進階應用》 第二章

書本 2-23 頁、 2-29 頁與2-34 頁中的同一系列圖片裡的程式,toLowerCase() 函數放錯位置了:

ans_btn.onRelease.toLowerCase() = function () {
  if (ans_txt.text == "apple") {
    // 內文省略
  }
}

正確程式請請參閱書本 2-35 頁,如下:

ans_btn.onRelease = function () {
  if (ans_txt.text.toLowerCase() == "apple") {
    // 內文省略
  }
}

感謝讀者利桂松先生的指正。

Posts created 470

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top