# Yes is another walking problem. I AM A NEWB AT AS

**URL:** <https://forum.kirupa.com/t/yes-is-another-walking-problem-i-am-a-newb-at-as/115464>\
**Category:** Uncategorized\
**Created:** [July 8, 2004, 8:27pm UTC](https://forum.kirupa.com/t/yes-is-another-walking-problem-i-am-a-newb-at-as/115464 "2004-07-08T20:27:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mixedtrigeno](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@mixedtrigeno](https://forum.kirupa.com/u/mixedtrigeno)\
**Post date:** [July 8, 2004, 8:27pm UTC](https://forum.kirupa.com/t/yes-is-another-walking-problem-i-am-a-newb-at-as/115464/1 "2004-07-08T20:27:54Z")

</div>

thanks to anyone that is reading this.

ok this is what i have so far:

-mc called “jump”-dont know yet how many frames will be  
-mc called “stand”-3 frames long  
-mc called “walk”-24 frames long  
-mc called “shooting”-10 frames long (dont know how many frames will be yet but lets assume)

now my question WHAT IS THE ACTION SCRIPT TO MAKE THIS THING WORK WELL. i have tried but the problem is that when i release the “right” or “left” key the “walk” mc keeps playing until it reaches the end.

and i swear I WILL make a tutorial about this cuse there isn’t really one that just teaches you just that. no hitTest no scrolling no nothing just how to make your hero in the game walk left right jump and shoot.  
so please help me so i can help others also thanks a lot.

if you need any more information to help me out please let me know i have tried the little i know to get it to work and have come back with nothing.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 20, 2004, 11:35am UTC](https://forum.kirupa.com/t/yes-is-another-walking-problem-i-am-a-newb-at-as/115464/2 "2004-07-20T11:35:10Z")

</div>

I did it in my game by setting a flag for crouching:

```auto

if (Key.isDown(Key.RIGHT)) {
_root.char.faceright = true;
} else if (Key.isDown(Key.LEFT)) {
_root.char.faceright = false;
}
 
// after all the other key checks
 
if (_root.char.faceright) { // this is for a character that faces right by default.
_root.char._xscale = 100
} else {
_root.char._xscale = -100
}

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 20, 2004, 4:15pm UTC](https://forum.kirupa.com/t/yes-is-another-walking-problem-i-am-a-newb-at-as/115464/3 "2004-07-20T16:15:41Z")

</div>

> [@dal platinum](#):
>
> I did it in my game by setting a flag for crouching:
> 
> ```auto
> 
> if (Key.isDown(Key.RIGHT)) {
> _root.char.faceright = true;
> } else if (Key.isDown(Key.LEFT)) {
> _root.char.faceright = false;
> }
>  
> // after all the other key checks
>  
> if (_root.char.faceright) { // this is for a character that faces right by default.
> _root.char._xscale = 100
> } else {
> _root.char._xscale = -100
> }
> 
> ```

thanks for the code man but your coding is really long and you are using 8 lines of coding for that.  
and i found a way to do it with just 3 lines of code. but thanks a lot though

```auto

onClipEvent(EnterFrame) {
if (Key.isDown(Key.DOWN)) {
// goto the walking animation
this.gotoAndStop("crouch");
}

```

by the way wat type of game are you making?
