# Please help me with me Flash game (As2.0)

**URL:** https://forum.kirupa.com/t/please-help-me-with-me-flash-game-as2-0/323908
**Category:** flash
**Created:** [July 23, 2011, 6:20pm UTC](https://forum.kirupa.com/t/please-help-me-with-me-flash-game-as2-0/323908 "2011-07-23T18:20:58Z")
**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 23, 2011, 6:20pm UTC](https://forum.kirupa.com/t/please-help-me-with-me-flash-game-as2-0/323908/1 "2011-07-23T18:20:58Z")

</div>

here is the link to my game : [http://www.filehosting.org/file/details/250097/gameswf.swf](http://www.filehosting.org/file/details/250097/gameswf.swf)  
or here is the direct download link [http://www.filehosting.org/file/details/250097/MQJXK48HAR7VQSQ3/gameswf.swf](http://www.filehosting.org/file/details/250097/MQJXK48HAR7VQSQ3/gameswf.swf)

Controls: move:J,L,jump:I,  
attack: S  
my problem: the charecter is sliding when you hold " A " key and hold " J " I " L "  
(sorry for my bad english)

character 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(83)) {  
this.gotoAndStop(“attack1”);  
if (this.hitTest(\_root.player2)) {  
–\_root.health2;  
\_root.player2.gotoAndStop(“fall”);  
}  
// end if  
}  
// end if  
}
