# UiScrollBar and keypress event

**URL:** https://forum.kirupa.com/t/uiscrollbar-and-keypress-event/198231
**Category:** flash
**Created:** [August 23, 2006, 12:10pm UTC](https://forum.kirupa.com/t/uiscrollbar-and-keypress-event/198231 "2006-08-23T12:10:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Akirasan](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@Akirasan](https://forum.kirupa.com/u/Akirasan)
#### Post date: [August 23, 2006, 12:10pm UTC](https://forum.kirupa.com/t/uiscrollbar-and-keypress-event/198231/1 "2006-08-23T12:10:31Z")

</div>

I have a chat swf with one dynamic textfield that shows the typed text and one input textfield with an “ok” button.

I’m using this code on the button:

```auto
on(release, keypress "enter") { //do something}

```

With this code after the typing, the user could just press the “enter” key to transfer the typed text to the dynamic textfield of the chat.

It was everything working perfectly, the problem showed up when I added the UiScrollBar component to scroll the dynamic textfield.

When I add the UiScrollBar **to the library** , the keypress “enter” event on the button stop working! If I delete the UiScrollBar component, keypress event start working again!

Is this a bug? What can I do to avoid this problem?

Thanks
