Ok so if you could please help me on this flash fighting game I am working on for a school project It would be greatly appreciated. So here is my dilemma, I'm working on my character's (Ken from streetfighter) movement and how keydown commands effect him. I have created separate movieclips of each animation. 8 in total. Each has multiple frames. I have also created a basic outline for the code:
var Key:KeyObject = new KeyObject(stage);
stage.addEventListener(Event.ENTER_FRAME, onenter);
function onenter(e:Event):void{
if (Key.isDown(Key.RIGHT)) {
Ken.x+=5;
Ken.scaleX=1;
Ken.gotoAndStop('KenWalk');
}else if (Key.isDown(Key.LEFT)) {
Ken.x+=-5;
Ken.scaleX=-1;
Ken.gotoAndStop('KenWalk');
}else{
Ken.gotoAndStop('Ken');
}
}
But I'm not sure how to make the gotoAndStop commands work with animations more than one frame long. If you could just tell me how to fix this I would be so happy.
If it makes it easier I'll post an attachment of my .fla file so you can see what I'm talking about. I'm not asking for a full tutorial on how to make the fighting game just how to make my character (Ken) do his walking animation when I press Left or Right. Also for his other animations.
Oh...Well it seems I can't add .fla files
Can you still help?