■ 例外処理を行うには
//メインタイムラインのフレームアクション
my_btn.onRelease
= function() {
try {
var id
= input_txt.text;
if (id == "") {
throw new Error("IDが入力されていません");
} else if (!isNaN(id.charAt(0)))
{
throw new Error("先頭に数字は使えません");
}
msg_txt.text = "IDを受け付けました";
} catch(e) {
msg_txt.text = e.message;
}
};

