crono7
02-09-2007, 10:34 PM
Well guys, i'm trying to make a site that's basically set up like an RPG, think Zelda or Chrono Trigger. I have a dude, and he can go all over. The problem is i don't know how to make him look like he's walking. I set up a movie clip that moves when the arrow keys are pressed. The mc has 4 frames, each with a picture of the dude facing a different of the 4 directions. When you press a key, the dude faces and moves in that directon. Now, i'm not sure how to have it so that when i hold down the arrow key, the dude walks (moves his legs, i have other pictures of him walking to use) instead of just sliding around. I am really hoping some people have some ideas. i would be incredibly grateful for help and inspiration here!
Thanks, guys.
Crono
P.S. below i wrote part of the relevant code i used so far (only listing the LEFT move. There's more.)
function moveStuff() {
if (Key.isDown(Key.LEFT)) {
this._x -= this.speed;
this.gotoAndPlay(3);
}
}
my_mc.speed = 5;
my_mc.onEnterFrame = movestuff();
Thanks, guys.
Crono
P.S. below i wrote part of the relevant code i used so far (only listing the LEFT move. There's more.)
function moveStuff() {
if (Key.isDown(Key.LEFT)) {
this._x -= this.speed;
this.gotoAndPlay(3);
}
}
my_mc.speed = 5;
my_mc.onEnterFrame = movestuff();