PDA

View Full Version : Enter button on chat window



Akirasan
August 25th, 2006, 07:46 AM
I have a chat window on a chess game with one dynamic textfield, that shows the typed text, and one input textfield with an "ok" button.

The OK button have this code to activate when user press the "enter" key:

on(release, keypress "enter") {//Do action}

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

When I added the UiScrollBar to the library, the keypress "enter" event on the button works no more! If I delete the UiScrollBar component, keypress event come back working again!

Looks like everytime you add a mx component, some events get messed up!

Is there a way to avoid this problem?

Thanks

Akirasan
August 25th, 2006, 05:29 PM
You can take a look in the game here:

http://www.etabuleiro.com/xadrez/chess.swf

The movie is in portuguese but it's not a problem to test the chat system...

REEFˇ
August 25th, 2006, 05:36 PM
Shouldnt it be keyPress "<Enter>"...not sure if thatll help.

Akirasan
August 26th, 2006, 11:54 AM
Hi Reef,

My mistake! I typed it wrong on the first message. The actual code in the button is:


on (release, keyPress "<Enter>")

Thanks