# Animation help :\[

**URL:** <https://forum.kirupa.com/t/animation-help/225648>\
**Category:** Uncategorized\
**Created:** [May 14, 2007, 5:36pm UTC](https://forum.kirupa.com/t/animation-help/225648 "2007-05-14T17:36:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dragonknight](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@Dragonknight](https://forum.kirupa.com/u/Dragonknight)\
**Post date:** [May 14, 2007, 5:36pm UTC](https://forum.kirupa.com/t/animation-help/225648/1 "2007-05-14T17:36:09Z")

</div>

```auto
onClipEvent (load) {
    moveSpeed = 10;
    jumping = true;
}
onClipEvent (enterFrame) {
    if (Key.isDown(Key.RIGHT)) {
        walking = true;
        this._x += moveSpeed;
        this._xscale = +100;
    } else if (Key.isDown(Key.UP)) {
        this._y -= 0;
    } else if (Key.isDown(Key.DOWN) && !fall) {
        this._y += 0;
    } else if (Key.isDown(Key.LEFT)) {
        walking = true;
        this._x -= moveSpeed;
        this._xscale = -100;
        if (walking == true) {
            this.gotoAndPlay("walk");
        }
    }
}
onClipEvent (enterFrame) {
    if (Key.isDown(Key.SPACE) && !jumping) {
        vel_y = 36;
        jumping = true;
        walking = false;
    }
    if (jumping == true) {
        this.gotoAndStop("jump");
        vel_y -= 2;
        if (vel_y<=-15) {
            vel_y = -15;
        }
        this._y -= vel_y;
    }
    if (_root.ground.hitTest(this._x, this._y+35, true)) {
        vel_y = 0;
        jumping = false;
        walking = false;
        this.gotoAndStop("idle");
    }
}
onClipEvent (enterFrame) {
    this._y += 16;
    if (_root.ground.hitTest(this._x, this._y+1, true)) {
        this._y -= 16;
    }
}

```

i can’t figure out how to make the walking animation work 😕

any ideas?
