# I have some problems with my Flash fighting game (As2.0)

**URL:** https://forum.kirupa.com/t/i-have-some-problems-with-my-flash-fighting-game-as2-0/323867
**Category:** flash
**Created:** [July 21, 2011, 5:54pm UTC](https://forum.kirupa.com/t/i-have-some-problems-with-my-flash-fighting-game-as2-0/323867 "2011-07-21T17:54:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ZeroKiryu](https://avatars.discourse-cdn.com/v4/letter/z/6a8cbe/32.png) [@ZeroKiryu](https://forum.kirupa.com/u/ZeroKiryu)
#### Post date: [July 21, 2011, 5:54pm UTC](https://forum.kirupa.com/t/i-have-some-problems-with-my-flash-fighting-game-as2-0/323867/1 "2011-07-21T17:54:12Z")

</div>

i started making my first flash game and now i can  
idle,run,jump,attack in the game  
controls: L=right  
J=left  
I=jump  
A=attack  
everything is ok but when i press L+J or J+L  
my character doing the sliding trick  
and when i press A+L , A+J , or A+I  
the character doing the same in the ground or in the air

i used this tutorial

char actions:

onClipEvent (load) {  
var speed = 0;  
var walk = 6;  
var run = 9;  
var grav = 0;  
var falling = 0;  
var jumped = false;  
var jumpHeight = 15;  
var touchingGround = false;  
var scale = \_xscale;  
var doorOpened = false;  
var attacked = false;  
}  
onClipEvent (enterFrame) {  
if (!touchingGround) {  
++grav;  
this.\_y = this.\_y+grav;  
} else {  
grav = 0;  
}  
// end else if  
if (\_root.ground.hitTest(\_x, \_y, true)) {  
touchingGround = true;  
} else {  
touchingGround = false;  
}  
// end else if  
if (!attacked) {  
if (Key.isDown(74)) {  
setProperty("", \_x, \_x-speed);  
this.gotoAndStop(2);  
setProperty("", \_xscale, -scale);  
}  
// end if  
if (Key.isDown(76)) {  
setProperty("", \_x, \_x+speed);  
this.gotoAndStop(2);  
setProperty("", \_xscale, scale);  
}  
// end if  
if (Key.isDown(Key.SHIFT)) {  
speed = run;  
} else {  
speed = walk;  
}  
// end if  
}  
// end else if  
}  
onClipEvent (enterFrame) {  
if (!attacked) {  
if (jumped) {  
falling = falling+5.000000E-001;  
setProperty("", \_y, \_y+falling);  
if (touchingGround) { jumped = false;  
}  
// end if  
} else if (Key.isDown(73)) {  
jumped = true;  
falling = -jumpHeight;  
this.gotoAndStop(3);  
}  
// end if  
}  
// end else if  
if (Key.isDown(73) && Key.isDown(76)) {  
this.gotoAndStop(3);  
}  
// end if  
if (Key.isDown(73) && Key.isDown(74)) {  
this.gotoAndStop(3);  
}  
// end if  
if (!Key.isDown(73) && !touchingGround) {  
this.gotoAndStop(3);  
} else if (Key.isDown(73) && !touchingGround) {  
this.gotoAndStop(3);  
}  
// end else if  
if (\_currentframe == 3 && touchingGround) {  
gotoAndStop(“idle”);  
}  
// end if  
}  
onClipEvent (keyUp) {  
if (!attacked) {  
gotoAndStop(“idle”);  
}  
// end if  
}  
onClipEvent (enterFrame) {  
// end if  
if (this.hitTest(\_root.wall)) {  
this.\_x = this.\_x+speed;  
}  
// end if  
}  
onClipEvent (enterFrame) {  
if (Key.isDown(65)) {  
this.gotoAndStop(“attack1”);  
if (this.hitTest(\_root.player2)) {  
–\_root.health2;  
\_root.player2.gotoAndStop(“fall”);  
}  
// end if  
}  
// end if  
}

PLS SOMEBODY HELP ME ☹

also i want to know how to add key combo attack  
like: wen i press A+S the character make a combo  
(sorry for my bad english)
