var inputAddressTextField:TextField = new TextField();
genericTextField(inputAddressTextField, 50 , 4, 200 , 20 , true, 0xcc0000 , true, 0xcc99ff , true , 0xffffff);
//obj,x,y,width,height,bg,bgColor,border,borderColor,selectable,textColor
//NOTE: just use 0 (zero) for bg and border color if false, and for sizes if autosizing
inputAddressTextField.type = TextFieldType.INPUT; //any specifics
header.addChild(inputAddressTextField);
formatTextStyle(inputAddressTextField , 14)
private function genericTextField(whichField:TextField , xpos:Number, ypos:Number , fieldWidth:Number , fieldHeight:Number , bgBool:Boolean, bgColor:uint , borderBool:Boolean , borderColor:uint , selectableBool:Boolean , txtColor:uint){
whichField.x = xpos
whichField.y = ypos;
whichField.width = fieldWidth;
whichField.height = fieldHeight;
whichField.background = bgBool;
whichField.backgroundColor = bgColor;
whichField.border = borderBool;
whichField.borderColor = borderColor;
whichField.selectable = selectableBool;
whichField.textColor = txtColor;
}//genericTextField
private function formatTextStyle(whichField:TextField , txtSize:Number):void{ //Set the stylesheet property before setting the content.
var format:TextFormat = new TextFormat(); //should have separate formatting function
format.size = txtSize;
format.font = “_sans”;
format.align = TextFormatAlign.LEFT;
whichField.defaultTextFormat = format;
}//addStyleSheet