AS3 TextBox ---- 输入框

package
{
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFieldType;
	import flash.text.TextFormat;
	/**
	 * 输入框,习惯了C#的输入文本框的名称:TextBox
	 * @author Jave.Lin
	 */
	public class TextBox extends TextField
	{
		public function TextBox($x:Number=0,$y:Number=0,$width:Number=100,$height:Number=20)
		{
			super();
			x = $x;
			y = $y;
			width = $width;
			height = $height;
			
			defaultTextFormat = new TextFormat("Verdana", 10, 0);
			autoSize = TextFieldAutoSize.LEFT;

//			wordWrap = true;
			type = TextFieldType.INPUT;
			
			border=true;
		}
	}
}

你可能感兴趣的:(function,C#,Class,import,textbox)