# Whats wrong with this code?

**URL:** https://forum.kirupa.com/t/whats-wrong-with-this-code/223736
**Category:** Uncategorized
**Created:** [April 25, 2007, 11:38am UTC](https://forum.kirupa.com/t/whats-wrong-with-this-code/223736 "2007-04-25T11:38:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![slayerX2](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@slayerX2](https://forum.kirupa.com/u/slayerX2)
#### Post date: [April 25, 2007, 11:38am UTC](https://forum.kirupa.com/t/whats-wrong-with-this-code/223736/1 "2007-04-25T11:38:21Z")

</div>

```auto
onClipEvent(enterFrame){
      

    if (Key.isDown(Key.LEFT)){
        this.gotoAndStop("Walking")
        this._x -= speed;
        this._yscale = 100
    
    }
    if (Key.isDown(Key.RIGHT)){
        this.gotoAndStop("Walking")
        this._x += speed;
        this._yscale = -100

    }
    if (Key.isDown(Key.UP)){
        this.gotoAndStop("Walking_up")
        this._y -= speed;
        

    }
        if (Key.isDown(Key.DOWN)){
        this.gotoAndStop("Walking_up")
        this._y += speed;
        this._rotation = 180

    }
}

```

see whats happening is, it walks left a right perfectly and when u press up (the down isn’t working like its not rotating for some reason). just try the code out urself, and watch wat happens its to hard to explain. Please tell me how to fix it
