TextField.restrict

by shapevent
♥0 | Line 16 | Modified 2010-12-09 02:12:11 | MIT License
play

ActionScript3 source code

/**
 * Copyright shapevent ( http://wonderfl.net/user/shapevent )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/teOC
 */

package {
    import flash.display.Sprite;
   
    import flash.text.*;
  
    
    public class FlashTest extends Sprite {
        
        private var txt:TextField;
        public function FlashTest() {
            
            txt = new TextField();
            txt.width = 200;
            txt.height = 20;
            txt.border = true;
            txt.type = TextFieldType.INPUT;
            txt.restrict = "^ ";
            addChild(txt);
          
        }
       
    }
}