Hey guys, I know some of you are pretty good with flash so I was wondering if anyone knew the answer to this. I started a Berserk game and I'm a little stuck on getting the basic movement to work properly. The walk cycle isn't playing when the character moves.
You can see a little demo of what I mean here. The controls are the arrow keys to move, and spacebar to attack.
www.ninetenths.org/serpy_game.html
Serpiko is a movie clip with the following code attached. Frame one is his idle stance. Frame 2 is his walk animation, and Frame 3 is his attack animation. For some reason the attack animation works and not the walk.
onClipEvent(enterFrame){
if(Key.isDown(Key.LEFT)){
this._x -= 8;
_xscale=-100;
this.gotoAndStop(2);
} if(Key.isDown(Key.RIGHT)){
this._x += 8;
_xscale=100;
this.gotoAndStop(2);
} if(Key.isDown(Key.UP)){
this._y -= 8;
this.gotoAndPlay(2);
} if(Key.isDown(Key.DOWN)){
this._y += 8;
this.gotoAndStop(2);
}if(Key.isDown(Key.SPACE)){
this.gotoAndStop(3);
}else{
this.gotoAndStop(1);
}
}
Any help or ideas are appreciated.
You can see a little demo of what I mean here. The controls are the arrow keys to move, and spacebar to attack.
www.ninetenths.org/serpy_game.html
Serpiko is a movie clip with the following code attached. Frame one is his idle stance. Frame 2 is his walk animation, and Frame 3 is his attack animation. For some reason the attack animation works and not the walk.
onClipEvent(enterFrame){
if(Key.isDown(Key.LEFT)){
this._x -= 8;
_xscale=-100;
this.gotoAndStop(2);
} if(Key.isDown(Key.RIGHT)){
this._x += 8;
_xscale=100;
this.gotoAndStop(2);
} if(Key.isDown(Key.UP)){
this._y -= 8;
this.gotoAndPlay(2);
} if(Key.isDown(Key.DOWN)){
this._y += 8;
this.gotoAndStop(2);
}if(Key.isDown(Key.SPACE)){
this.gotoAndStop(3);
}else{
this.gotoAndStop(1);
}
}
Any help or ideas are appreciated.