Добрый вечер.
Понимаю, что вопрос несуразный но суть такова.
Я пишу игру на HAXE
У меня есть класс CosmoFont, который расширяет TextField.

Код AS3:
package;
import openfl.Assets;
import openfl.text.TextField;
import openfl.text.TextFieldAutoSize;
import openfl.text.TextFormat;
/**
* ...
* @author Volodin A.S.
*/
class CosmoFont1 extends TextField
{
public function new(txt:String, x:Float=0, y: Float=0, size:Int=22, color:Int=0x000000, autosize:String = "l")
{
super();
this.x = x;
this.y = y;
var textFormat: TextFormat = new TextFormat();
textFormat.color = color;
textFormat.size = size;
textFormat.font = Assets.getFont("fonts/CosmoFont1.ttf").fontName;
defaultTextFormat = textFormat;
embedFonts = true;
switch(autosize)
{
case "l":
autoSize = TextFieldAutoSize.LEFT;
case "r":
autoSize = TextFieldAutoSize.RIGHT;
case "c":
autoSize = TextFieldAutoSize.CENTER;
default:
autoSize = TextFieldAutoSize.LEFT;
}
mouseEnabled = false;
this.text = txt;
}
}
И чтобы создать текстовое поле, мне необходимо передавать в конструктор класса кучу параметров.
Выходит нечто вроде этого:

Код AS3:
coordsTF2 = new CosmoFont2("", 100, 150, 22, 0xffffff);
Вопрос: как мне создать класс, который можно будет настраивать постепенно (ИЛИ в конструкторе)?
Имею в виду:

Код AS3:
cosmo = CosmoFont1();
cosmo.txt = "текст";
cosmo.x = 123
// и т.д.