Allows numbers only, with the exception of 5 : Filter : TextField Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » TextField » Filter »

 

Allows numbers only, with the exception of 5


 

package {

  import flash.display.Sprite;
  import flash.text.TextField;
  public class Main extends Sprite {
    public function Main(  ) {
      var field:TextField = new TextField(  );
      field.type = flash.text.TextFieldType.INPUT;
      field.border = true;
      field.background = true;  
      field.restrict = "0-9^5";    
      addChild(field);
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo TextField
» Filter