# Buttons not workin on different scene

**URL:** https://forum.kirupa.com/t/buttons-not-workin-on-different-scene/238455
**Category:** flash
**Created:** [September 11, 2007, 2:59pm UTC](https://forum.kirupa.com/t/buttons-not-workin-on-different-scene/238455 "2007-09-11T14:59:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![localZero](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/localzero/32/3741_2.png) [@localZero](https://forum.kirupa.com/u/localZero)
#### Post date: [September 11, 2007, 2:59pm UTC](https://forum.kirupa.com/t/buttons-not-workin-on-different-scene/238455/1 "2007-09-11T14:59:16Z")

</div>

So here’s the issue. I have two galleries and two scenes when I jump from scene to another the prev/next buttons in galleries stop workin when pressing left/right arrow. Mouse functions just fine, no problem there.

When i press left/right the gallery jumps a few photos ahead or backwards…

```auto
listen = new Object();
listen.onKeyDown = function() {
    if (Key.getCode() == Key.LEFT) {
        prevImage();
    } else if (Key.getCode() == Key.RIGHT) {
        nextImage();
    }
};
Key.addListener(listen);
previous_btn.onRelease = function() {
    prevImage();
};
next_btn.onRelease = function() {
    nextImage();
};

```

So if anyone can offer help I’d be glad. I’m runnig out hair 😃
