Add change event to TextField : Event : TextField Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » TextField » Event »

 

Add change event to TextField


 
package {
  import flash.display.*;
  import flash.events.*;
  import flash.text.*;

  public class Main extends Sprite {
    private var inputfield:TextField = new TextField(  );

    public function Main() {
      inputfield.text = "";
      inputfield.width  = 150;
      inputfield.height = 30;
      inputfield.border     = true;
      inputfield.background = true;
      inputfield.type = TextFieldType.INPUT;
      addChild(inputfield);

      inputfield.addEventListener(Event.CHANGE, changeListener);
    }
    private function changeListener (e:Event):void {
      trace("event");
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo TextField
» Event