ok... i have some script making my character move left and right, and while he moves left and right he looks in the respective direction and goes into his walk animation.
but once the walk animation starts, it wont stop, even if he stops moving.
how do i make the walking animation stop.
the walk animation is in frame 2 and the standing animation is in frame 1
onClipEvent (load) {
gravity = 10;
walkSpeed = 6;
maxJump = 4;
scale = _xscale;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
_xscale = -scale;
_x -= walkSpeed;
this.gotoAndStop(2);
}
if (Key.isDown(Key.RIGHT)) {
_xscale = +scale;
_x += walkSpeed;
this.gotoAndStop(2);
}
}
can someone help me?
