Hi

I have a text chat program which let users input text message.

I want them able to input text by pressing 'Enter' key on keyboard.

Code:
if(Key.isDown(Key.ENTER)){
      addTextMessage();
    }
It has compiled error on AS3. How should I fix it?