Return to Snippet

Revision: 33050
at August 8, 2011 04:01 by heathbo


Updated Code
var format:TextFormat = new TextFormat();
format.bold = true;
format.italic = true;
format.underline = true;
format.font = "Arial";
format.size = 14;
format.color = 0xFFFFFF;
format.align = TextFormatAlign.CENTER;
format.indent = 0;
format.kerning = false;

var myTextField = new TextField();
myTextField.embedFonts = true;
myTextField.wordWrap = true;
myTextField.selectable = false;
myTextField.autoSize = TextFieldAutoSize.CENTER;
myTextField.antiAliasType = "advanced";
myTextField.width = 187;
myTextField.x = 256;
myTextField.y = 265;

myTextField.setTextFormat(format);  //OR
myTextField.defaultTextFormat = format;

myTextField.htmlText = "Whatever the text is thats going into the textfield";

myTextField.border = true;
myTextField.borderColor = 0xFFFFFF

addChild(myTextField);

Revision: 33049
at August 7, 2011 04:26 by heathbo


Updated Code
var format:TextFormat = new TextFormat();
format.bold = true;
format.italic = true;
format.underline = true;
format.font = "Arial";
format.size = 14;
format.color = 0xFFFFFF;
format.align = TextFormatAlign.CENTER;
format.indent = 0;
format.kerning = false;


myTextField.setTextFormat(format);  //OR
myTextField.defaultTextFormat = format;

myTextField.embedFonts = true;
myTextField.autoSize = TextFieldAutoSize.LEFT
myTextField.border = true;
myTextField.borderColor = 0xFFFFFF
myTextField.wordWrap = true;
myTextField.multiline = true;

Revision: 33048
at August 7, 2011 04:22 by heathbo


Updated Code
var format:TextFormat = new TextFormat();
format.bold = true;
format.italic = true;
format.underline = true;
format.font = "Arial";
format.size = 14;
format.color = 0xFFFFFF;
format.align = TextFormatAlign.CENTER;
format.indent = 0;
format.kerning = false;


myTextField.setTextFormat(format);


myTextField.embedFonts = true;
myTextField.autoSize = TextFieldAutoSize.LEFT
myTextField.border = true;
myTextField.borderColor = 0xFFFFFF
myTextField.wordWrap = true;
myTextField.multiline = true;

Revision: 33047
at August 7, 2011 04:15 by heathbo


Updated Code
var format:TextFormat = new TextFormat();
format.bold = true;
format.italic = true;
format.underline = true;
format.font = "Arial";
format.size = 14;
format.color = 0xFFFFFF;
format.align = TextFormatAlign.CENTER;
format.indent = 0;
format.kerning = false;


myTextField.setTextFormat(format);


myTextField.embedFonts = true;
myTextField.autoSize = true;
myTextField.border = true;
myTextField.borderColor = 0xFFFFFF
myTextField.wordWrap = true;
myTextField.multiline = true;

Revision: 33046
at August 7, 2011 04:11 by heathbo


Updated Code
var format:TextFormat = new TextFormat();
format.bold = true;
format.italic = true;
format.underline = true;
format.font = "Arial";
format.size = 14;
format.color = 0xFFFFFF;
format.align = ���¢�¯�¿�½�¯�¿�½left���¢�¯�¿�½�¯�¿�½;
format.indent = 0;
format.kerning = false;
format.url = ���¢�¯�¿�½�¯�¿�½���¢�¯�¿�½�¯�¿�½(empty string);


myTextField.setTextFormat(format);


myTextField.embedFonts = true;
myTextField.autoSize = true;
myTextField.border = true;
myTextField.borderColor = 0xFFFFFF
myTextField.wordWrap = true;
myTextField.multiline = true;

Revision: 33045
at October 9, 2010 06:29 by heathbo


Updated Code
var format:TextFormat = new TextFormat();
format.bold = true;
format.italic = true;
format.underline = true;
format.font = "Arial";
format.size = 14;
format.color = 0xFFFFFF;
format.align = �¢ï¿½ï¿½left�¢ï¿½ï¿½;
format.indent = 0;
format.kerning = false;
format.url = �¢ï¿½ï¿½�¢ï¿½ï¿½(empty string);


myTextField.setTextFormat(format);


myTextField.embedFonts = true;
myTextField.autoSize = true;
myTextField.border = true;
myTextField.borderColor = 0xFFFFFF
myTextField.wordWrap = true;

Revision: 33044
at October 9, 2010 06:28 by heathbo


Updated Code
var format:TextFormat = new TextFormat();
format.bold = true;
format.italic = true;
format.underline = true;
format.font = "Arial";
format.size = 14;
format.color = 0xFFFFFF;
format.align = �left�;
format.indent = 0;
format.kerning = false;
format.url = ��(empty string);


myTextField.setTextFormat(format);


myTextField.embedFonts = true;
myTextField.autoSize = true;
myTextField.border = true;
myTextField.borderColor = 0xFFFFFF
myTextField.wordWrap = true;

Revision: 33043
at October 9, 2010 06:27 by heathbo


Updated Code
var format:TextFormat = new TextFormat();
format.bold = true;
format.italic = true;
format.underline = true;
format.font = "Arial";
format.size = 14;
format.color = 0xFFFFFF;
format.align = �left�;
format.indent = 0;
format.kerning = false;
format.url = ��(empty string);


myTextField.setTextFormat(format);


myTextField.embedFonts = true;
myTextField.autoSize = true;
myTextField.border = true;
myTextField.borderColor = 0xFFFFFF
myTextField.wordWrap = true;

Revision: 33042
at October 5, 2010 13:43 by heathbo


Initial Code
var format:TextFormat = new TextFormat();
format.bold = true;
format.italic = true;
format.underline = true;
format.font = "Arial";
format.size = 14;
format.color = 0xFFFFFF;
format.align = “left”;
format.indent = 0;
format.kerning = false;
format.url = “”(empty string);


myTextField.setTextFormat(format);


myTextField.embedFonts = true;
myTextField.autoSize = true;
myTextField.border = true;
myTextField.borderColor = 0xFFFFFF
myTextField.wordWrap = true;

Initial URL

                                

Initial Description
myTextField.defaultTextFormat = format;  myTextField.setTextFormat(format); Both can be used.  The difference is, setTextFormat will only change the text currently in the text field.  Any new text inserted into the text field will revert back to its default.  defaultTextFormat changes the default which will change the format for the current text and all future text.

Initial Title
Text and Field Formatting

Initial Tags

                                

Initial Language
ActionScript 3