flash on 2009-12-29

by _shimizu
♥0 | Line 24 | Modified 2009-12-29 02:02:29 | MIT License
play

ActionScript3 source code

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

package {
	import flash.text.TextField;
	import flash.text.TextFormat;
	import flash.text.TextFieldType;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            var tf:TextFormat = new TextFormat();
         	tf.font = "_typewriter";
         	tf.size = 18;
         	
         	var fld:TextField = new TextField();
         	fld.type = TextFieldType.INPUT;
         	fld.defaultTextFormat = tf;
         	fld.restrict = "_.0-9a-zA-Z";
         	fld.maxChars = 25;
         	fld.x = 100;
         	fld.y = 100;
         	fld.width = 300;
         	fld.height = 24;
         	fld.border = true;
         	addChild(fld);
            
        }
    }
}