I'm trying to make a fighting game in flash (if there is a better free program for doing this tell me) I'm still coding it but for the running I have a Movie Clip of a person walking but when I press the buttons they just move insteid of walk here is the code
Code:
onClipEvent(load){
fight = false;
}
onClipEvent(enterFrame){
if(fight == false){
if(Key.isDown(Key.LEFT) && fight != true){
this._x -= 4;//walk left..
this._xscale = -100;
this.gotoAndStop(2);
}else if(Key.isDown(Key.RIGHT) && fight != true){
this._x += 4; //this ^ Walk right.
this._xscale = 100;
this.gotoAndStop(2);
}else{
this.gotoAndStop(1);
}
}
if(Key.isDown(Key.SPACE)){
this.gotoAndStop(1);
fight = true;
}
if(this._currentframe == 1){
fight = false;
}
}