概要 | onKeyUp? が働かない |
---|---|
投稿者 | Parafla Quality |
状態 | |
カテゴリー | ActionScript |
投稿日 | 2010-12-24 (金) 17:56:09 |
バージョン | 1.38 |
キー入力を検出するため、次のコードを試しました。
focusEnabled = true; onKeyUp = function (){ trace("onKeyUp called by "+this._name); }; onSetFocus = function (dmy){ trace("onSetFocus called by "+this._name); }; onKillFocus = function (dmy){ trace("onKillFocus called by "+this._name); }; Selection.setFocus(this);
結果は「onSetFocus? called by xxx」と表示されるだけで、キー入力には何も反応が有りません。onKillFocus? も実行されていないので、フォーカスは保持したままだと思います。
何故、キー入力に反応しないのでしょうか? onKeyUp? の使い方を間違えているのでしょうか?