概要 | キー入力で移動する時の画像の向き |
---|---|
投稿者 | Parafla Quality |
状態 | 質問 |
カテゴリー | ParaFla! |
投稿日 | 2006-11-01 (水) 20:31:56 |
バージョン | 1.31 |
方向キーを押した方向に、 キャラの向きを変えて移動させる
というのがやりたいのですが、 キャラの向きがちゃんと変わってくれません。 どうしたらいいでしょうか?
スプライト(a)の中に
ラベル--front 前向の画像 停止 ラベル--back 後向の画像 停止 ラベル--left 左向の画像 停止 ラベル--right 右向の画像 停止
と入れて、 スプライト(a)のクリップアクションに onClipEvent?(enterFrame) {
if (Key.isDown(Key.UP)){ this.gotoAndStop?("front"); this._y -= 5;
} else if(Key.isDown(Key.DOWN)) { this.gotoAndStop?("back"); this._y += 5;
} else if(Key.isDown(Key.RIGHT)) { this.gotoAndStop?("right"); this._x += 5;
} else if (Key.isDown(Key.LEFT)) { this.gotoAndStop?("left"); this._x -= 5; } }
が入っています。