書本 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") {
// 內文省略
}
}
感謝讀者利桂松先生的指正。
