Hey guys I’m having trouble setting the color of the text of a TextInput component.
I know there is a TextField within it, I’m trying several methods, but none works:
----------- method 1 (textField.textColor)
_input_name = new TextInput();
_input_name.textField.background = true;
_input_name.textField.backgroundColor = 0x2a2a2a;
_input_name.textField.textColor = 0xFFFFFF;
_input_name.text = “some text”;
addChild(_input_name);
----------- method 2 (textField.defaultTextFormat)
var tfm:TextFormat = new TextFormat();
tfm.color = 0xFFFFFF;
_input_name = new TextInput();
_input_name.textField.background = true;
_input_name.textField.backgroundColor = 0x2a2a2a;
_input_name.textField.borderColor = 0xCCCCCC;
_input_name.text = “some text”;
_input_name.textField.defaultTextFormat = tfm;
addChild(_input_name);
background color changes nicely but text won’t react