1 Reply Latest reply on Mar 29, 2008 9:53 PM by Gaurav J

    textarea qs.

    trycold Level 1

      I have a textarea in my app in which if pressed enter it executes some other function.

      I have it like this:

      <mx:TextArea xmlns:mx=" http://www.adobe.com/2006/mxml" creationComplete="TextAreaSetUp();"
      text="Search Form" focusIn="this.text = ''" >

      import model.ApplicationModel;

      public function TextAreaSetUp():void {

      this.addEventListener(KeyboardEvent.KEY_UP, ButtonReturnPressed );

      public function ButtonReturnPressed(evt:KeyboardEvent):void {
      if(evt.keyCode == Keyboard.ENTER) {
      DebugWindow.debugProps(this.text); }


      Once the enter is pressed i need the value of the textarea in the above function. Above I tried using this.text but it keeps on appendng the value in the textarea. How can I get the textarea value.