forked from: TextField_INPUT

by ieha forked from TextField_INPUT (diff: 1)
♥0 | Line 23 | Modified 2010-02-04 19:11:44 | MIT License
play

ActionScript3 source code

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

// forked from oshige's TextField_INPUT
package {
	import flash.display.Sprite;
	import flash.text.TextField;
	import flash.text.TextFieldType;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFormat;
	public class MyTextField extends Sprite {
		public function MyTextField(){
			//テキストの書式
			var tf:TextFormat = new TextFormat();
			tf.font = "_typewriter";
			tf.size = 18;
			//テキスト入力フィールドの作成
			var fld:TextField = new TextField();
			fld.type = TextFieldType.INPUT;
			fld.defaultTextFormat = tf;
			fld.x = 100;
			fld.y = 50;
			fld.width = 300;
			fld.height = 24;
			fld.border = true;
			addChild(fld);
		}
	}
}