package{ import flash.text.TextFormat; import flash.text.TextField; import flash.text.TextFieldType; import flash.display.Sprite; import flash.text.TextFieldAutoSize; public class square extends Sprite{ public function square(){ var fld:TextField = new TextField(); fld.type = TextFieldType.INPUT; var tf:TextFormat = new TextFormat; tf.font = "_typewriter"; tf.size =18; fld.defaultTextFormat = tf; fld.x =30; fld.y =50; fld.width =300; fld.height = 30; fld.border = true; fld.text = "imput here."; //fld.autoSize = TextFieldAutoSize.LEFT; addChild(fld); fld.selectable= false; }//square }//class }//package forked from: sample 1