# Movie clip movement help

**URL:** https://forum.kirupa.com/t/movie-clip-movement-help/87139
**Category:** Uncategorized
**Created:** [April 18, 2005, 7:31pm UTC](https://forum.kirupa.com/t/movie-clip-movement-help/87139 "2005-04-18T19:31:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Exedus](https://avatars.discourse-cdn.com/v4/letter/e/b19c9b/32.png) [@Exedus](https://forum.kirupa.com/u/Exedus)
#### Post date: [April 18, 2005, 7:31pm UTC](https://forum.kirupa.com/t/movie-clip-movement-help/87139/1 "2005-04-18T19:31:00Z")

</div>

I have four buttons that move the clip up, down, right and left. Here is the script I’m using.

```auto
rightBtn.onPress = function() {
        b1 = true;
}
rightBtn.onRelease = function() {
        b1 = false;
}
leftBtn.onPress = function() {
        b2 = true;
}
leftBtn.onRelease = function() {
        b2 = false;
}
upBtn.onPress = function() {
        b3 = true;
}
upBtn.onRelease = function() {
        b3 = false;
}
downBtn.onPress = function() {
        b4 = true;
}
downBtn.onRelease = function() {
        b4 = false;
}

small.onEnterFrame = function() {
        this._x += (b1 - b2) * 4;
        this._y += (b4 - b3) * 4;
}

```

I’m getting some strange results though. Basically if I want to move the clip left it wont work until I click on the right movement button first. Same thing with up and down. I have no idea what’s causing this.
