, they do not modify how your list is rendered. All lists are unordered and all
* list items use bullets.
*
* Paragraph tag
*
* The tag creates a new paragraph. The text field must be set to be a multiline
* text field to use this tag.
*
* The
tag supports the following attributes:
*
* align: Specifies alignment of text within the paragraph; valid values are left, right, justify, and center.
*
* class: Specifies a CSS style class defined by a flash.text.StyleSheet object.
*
* Span tag
*
* The tag is available only for use with CSS text styles. It supports the
* following attribute:
*
* class: Specifies a CSS style class defined by a flash.text.StyleSheet object.
*
* Text format tag
* The tag lets you use a subset of paragraph formatting
* properties of the TextFormat class within text fields, including line leading, indentation,
* margins, and tab stops. You can combine tags with the
* built-in HTML tags. The tag has the following attributes: blockindent: Specifies the block indentation in points; corresponds to
* TextFormat.blockIndent.
* indent: Specifies the indentation from the left margin to the first character
* in the paragraph; corresponds to TextFormat.indent. Both positive and negative
* numbers are acceptable.
* leading: Specifies the amount of leading (vertical space) between lines;
* corresponds to TextFormat.leading. Both positive and negative numbers are acceptable.
* leftmargin: Specifies the left margin of the paragraph, in points; corresponds
* to TextFormat.leftMargin.
* rightmargin: Specifies the right margin of the paragraph, in points; corresponds
* to TextFormat.rightMargin.
* tabstops: Specifies custom tab stops as an array of non-negative integers;
* corresponds to TextFormat.tabStops.
*
* Underline tag
*
* The tag underlines the tagged text.
* Flash Player and AIR support the following HTML entities:
* Entity
*
* Description
*
* <
*
* < (less than)
*
* >
*
* > (greater than)
*
* &
*
* & (ampersand)
*
* "
*
* " (double quotes)
*
* '
*
* ' (apostrophe, single quote)
*
* Flash Player and AIR also support explicit character codes, such as
* & (ASCII ampersand) and € (Unicode € symbol).
*/
public get htmlText () : string{
return (this.adaptee).htmlText;
}
public set htmlText (value:string){
(this.adaptee).htmlText=value;
}
/**
* The number of characters in a text field. A character such as tab (\t) counts as one
* character.
*/
public get length () : number{
//todo
return ( this._adaptee).length;
}
/**
* The maximum number of characters that the text field can contain, as entered by a user.
* A script can insert more text than maxChars allows; the maxChars property
* indicates only how much text a user can enter. If the value of this property is 0,
* a user can enter an unlimited amount of text.
*/
public get maxChars () : number{
//todo
console.log("maxChars not implemented yet in flash/TextField");
return 0;
}
public set maxChars (value:number){
//todo
console.log("maxChars not implemented yet in flash/TextField");
}
/**
* The maximum value of scrollH.
*/
public get maxScrollH () : number{
//todo
//console.log("maxScrollH not implemented yet in flash/TextField");
return 0;
}
/**
* The maximum value of scrollV.
*/
public get maxScrollV () : number{
//todo
//console.log("maxScrollV not implemented yet in flash/TextField");
return 0;
}
/**
* A Boolean value that indicates whether Flash Player automatically scrolls multiline
* text fields when the user clicks a text field and rolls the mouse wheel.
* By default, this value is true. This property is useful if you want to prevent
* mouse wheel scrolling of text fields, or implement your own text field scrolling.
*/
public get mouseWheelEnabled () : boolean{
//todo
//console.log("mouseWheelEnabled not implemented yet in flash/TextField");
return false;
}
public set mouseWheelEnabled (value:boolean){
//todo
//console.log("mouseWheelEnabled not implemented yet in flash/TextField");
}
/**
* Indicates whether field is a multiline text field. If the value is true,
* the text field is multiline; if the value is false, the text field is a single-line
* text field. In a field of type TextFieldType.INPUT, the multiline value
* determines whether the Enter key creates a new line (a value of false,
* and the Enter key is ignored).
* If you paste text into a TextField with a multiline value of false,
* newlines are stripped out of the text.
*/
public get multiline () : boolean{
//todo
//console.log("multiline not implemented yet in flash/TextField");
return ( this._adaptee).multiline;
}
public set multiline (value:boolean){
//todo
//console.log("multiline not implemented yet in flash/TextField");
( this._adaptee).multiline=value;
}
/**
* Defines the number of text lines in a multiline text field.
* If wordWrap property is set to true,
* the number of lines increases when text wraps.
*/
public get numLines () : number{
//todo
console.log("numLines not implemented yet in flash/TextField");
return ( this._adaptee).numLines;
}
/**
* Indicates the set of characters that a user can enter into the text field. If the value of the
* restrict property is null, you can enter any character. If the value of
* the restrict property is an empty string, you cannot enter any character. If the value
* of the restrict property is a string of characters, you can enter only characters in
* the string into the text field. The string is scanned from left to right. You can specify a range by
* using the hyphen (-) character. Only user interaction is restricted; a script can put any text into the
* text field. This property does not synchronize with the Embed font options
* in the Property inspector.If the string begins with a caret (^) character, all characters are initially accepted and
* succeeding characters in the string are excluded from the set of accepted characters. If the string does
* not begin with a caret (^) character, no characters are initially accepted and succeeding characters in the
* string are included in the set of accepted characters.The following example allows only uppercase characters, spaces, and numbers to be entered into
* a text field:
* my_txt.restrict = "A-Z 0-9";
* The following example includes all characters, but excludes lowercase letters:
* my_txt.restrict = "^a-z";
* You can use a backslash to enter a ^ or - verbatim. The accepted backslash sequences are \-, \^ or \\.
* The backslash must be an actual character in the string, so when specified in ActionScript, a double backslash
* must be used. For example, the following code includes only the dash (-) and caret (^):
* my_txt.restrict = "\\-\\^";
* The ^ can be used anywhere in the string to toggle between including characters and excluding characters.
* The following code includes only uppercase letters, but excludes the uppercase letter Q:
* my_txt.restrict = "A-Z^Q";
* You can use the \u escape sequence to construct restrict strings.
* The following code includes only the characters from ASCII 32 (space) to ASCII 126 (tilde).
* my_txt.restrict = "\u0020-\u007E";
*/
public get restrict () : string{
return (this.adaptee).restrict;
}
public set restrict (value:string){
(this.adaptee).restrict=value;
}
/**
* The current horizontal scrolling position. If the scrollH property is 0, the text
* is not horizontally scrolled. This property value is an integer that represents the horizontal
* position in pixels.
*
* The units of horizontal scrolling are pixels, whereas the units of vertical scrolling are lines.
* Horizontal scrolling is measured in pixels because most fonts you typically use are proportionally
* spaced; that is, the characters can have different widths. Flash Player performs vertical scrolling by
* line because users usually want to see a complete line of text rather than a
* partial line. Even if a line uses multiple fonts, the height of the line adjusts to fit
* the largest font in use.Note: The scrollH property is zero-based, not 1-based like
* the scrollV vertical scrolling property.
*/
public get scrollH () : number{
//todo
console.log("scrollH not implemented yet in flash/TextField");
return 0;
}
public set scrollH (value:number){
//todo
console.log("scrollH not implemented yet in flash/TextField");
}
/**
* The vertical position of text in a text field. The scrollV property is useful for
* directing users to a specific paragraph in a long passage, or creating scrolling text fields.
*
* The units of vertical scrolling are lines, whereas the units of horizontal scrolling are pixels.
* If the first line displayed is the first line in the text field, scrollV is set to 1 (not 0).
* Horizontal scrolling is measured in pixels because most fonts are proportionally
* spaced; that is, the characters can have different widths. Flash performs vertical scrolling by line
* because users usually want to see a complete line of text rather than a partial line.
* Even if there are multiple fonts on a line, the height of the line adjusts to fit the largest font in
* use.
*/
public get scrollV () : number{
//todo
console.log("scrollV not implemented yet in flash/TextField");
return 0;
}
public set scrollV (value:number){
//todo
console.log("scrollV not implemented yet in flash/TextField");
}
/**
* A Boolean value that indicates whether the text field is selectable. The value true
* indicates that the text is selectable. The selectable property controls whether
* a text field is selectable, not whether a text field is editable. A dynamic text field can
* be selectable even if it is not editable. If a dynamic text field is not selectable, the user
* cannot select its text.
*
* If selectable is set to false, the text in the text field does not
* respond to selection commands from the mouse or keyboard, and the text cannot be copied with the
* Copy command. If selectable is set to true, the text in the text field
* can be selected with the mouse or keyboard, and the text can be copied with the Copy command.
* You can select text this way even if the text field is a dynamic text field instead of an input text field.
*/
public get selectable () : boolean{
//todo
//console.log("selectable not implemented yet in flash/TextField");
return false;
}
public set selectable (value:boolean){
//todo
( this._adaptee).selectable=value;
//console.log("selectable not implemented yet in flash/TextField");
}
public get selectedText () : string{
//todo
console.log("selectedText not implemented yet in flash/TextField");
return "";
}
/**
* The zero-based character index value of the first character in the current selection.
* For example, the first character is 0, the second character is 1, and so on. If no
* text is selected, this property is the value of caretIndex.
*/
public get selectionBeginIndex () : number{
//todo
console.log("selectionBeginIndex not implemented yet in flash/TextField");
return 0;
}
/**
* The zero-based character index value of the last character in the current selection.
* For example, the first character is 0, the second character is 1, and so on. If no
* text is selected, this property is the value of caretIndex.
*/
public get selectionEndIndex () : number{
//todo
console.log("selectionEndIndex not implemented yet in flash/TextField");
return 0;
}
/**
* The sharpness of the glyph edges in this text field. This property applies
* only if the flash.text.AntiAliasType property of the text field is set to
* flash.text.AntiAliasType.ADVANCED. The range for
* sharpness is a number from -400 to 400. If you attempt to set
* sharpness to a value outside that range, Flash sets the property to
* the nearest value in the range (either -400 or 400).
*/
public get sharpness () : number{
//todo
console.log("sharpness not implemented yet in flash/TextField");
return 0;
}
public set sharpness (value:number){
//todo
console.log("sharpness not implemented yet in flash/TextField");
}
/**
* Attaches a style sheet to the text field. For information on creating style sheets, see the StyleSheet class
* and the ActionScript 3.0 Developer's Guide.
*
* You can change the style sheet associated with a text field at any time. If you change
* the style sheet in use, the text field is redrawn with the new style sheet.
* You can set the style sheet to null or undefined
* to remove the style sheet. If the style sheet in use is removed, the text field is redrawn without a style sheet. Note: If the style sheet is removed, the contents of both TextField.text and
* TextField.htmlText change to incorporate the formatting previously applied by the style sheet. To preserve
* the original TextField.htmlText contents without the formatting, save the value in a variable before
* removing the style sheet.
*/
public get styleSheet () : StyleSheet{
//todo
console.log("styleSheet not implemented yet in flash/TextField");
return null;
}
public set styleSheet (value:StyleSheet){
//todo
console.log("styleSheet not implemented yet in flash/TextField");
}
/**
* A string that is the current text in the text field. Lines are separated by the carriage
* return character ('\r', ASCII 13). This property contains unformatted text in the text
* field, without HTML tags.
*
* To get the text in HTML form, use the htmlText property.
*/
public get text () : string{
return ( this._adaptee).text;
}
public set text (value:string){
( this._adaptee).text=value;
}
/**
* The color of the text in a text field, in hexadecimal format.
* The hexadecimal color system uses six digits to represent
* color values. Each digit has 16 possible values or characters. The characters range from
* 0-9 and then A-F. For example, black is 0x000000; white is
* 0xFFFFFF.
*/
public get textColor () : number{
return ( this._adaptee).textColor;
}
public set textColor (value:number){
( this._adaptee).textColor=value;
}
/**
* The height of the text in pixels.
*/
public get textHeight () : number{
return ( this._adaptee).textHeight;
}
/**
* The interaction mode property, Default value is TextInteractionMode.NORMAL.
* On mobile platforms, the normal mode implies that the text can be scrolled but not selected.
* One can switch to the selectable mode through the in-built context menu on the text field.
* On Desktop, the normal mode implies that the text is in scrollable as well as selection mode.
*/
public get textInteractionMode () : string{
//todo
console.log("textInteractionMode not implemented yet in flash/TextField");
return "";
}
/**
* The width of the text in pixels.
*/
public get textWidth () : number{
return ( this._adaptee).textWidth;
}
/**
* The thickness of the glyph edges in this text field. This property applies only
* when flash.text.AntiAliasType is set to flash.text.AntiAliasType.ADVANCED.
*
* The range for thickness is a number from -200 to 200. If you attempt to
* set thickness to a value outside that range, the property is set to the
* nearest value in the range (either -200 or 200).
*/
public get thickness () : number{
//todo
console.log("thickness not implemented yet in flash/TextField");
return 0;
}
public set thickness (value:number){
//todo
console.log("thickness not implemented yet in flash/TextField");
}
/**
* The type of the text field.
* Either one of the following TextFieldType constants: TextFieldType.DYNAMIC,
* which specifies a dynamic text field, which a user cannot edit, or TextFieldType.INPUT,
* which specifies an input text field, which a user can edit.
* @throws ArgumentError The type specified is not a member of flash.text.TextFieldType.
*/
public get type () : string{
//todo
console.log("type not implemented yet in flash/TextField");
return "";
}
public set type (value:string){
//this.adaptee.
//todo
console.log("type not implemented yet in flash/TextField");
}
/**
* Specifies whether to copy and paste the text formatting along with the text. When set to true,
* Flash Player copies and pastes formatting (such as alignment, bold, and italics) when you copy and paste between text fields. Both the origin and destination text fields for the copy and paste procedure must have
* useRichTextClipboard set to true. The default value
* is false.
*/
public get useRichTextClipboard () : boolean{
//todo
console.log("useRichTextClipboard not implemented yet in flash/TextField");
return false;
}
public set useRichTextClipboard (value:boolean){
//todo
console.log("useRichTextClipboard not implemented yet in flash/TextField");
}
/**
* A Boolean value that indicates whether the text field has word wrap. If the value of
* wordWrap is true, the text field has word wrap;
* if the value is false, the text field does not have word wrap. The default
* value is false.
*/
public get wordWrap () : boolean{
return ( this._adaptee).wordWrap;
}
public set wordWrap (value:boolean){
( this._adaptee).wordWrap=value;
}
/**
* Appends the string specified by the newText parameter to the end of the text
* of the text field. This method is more efficient than an addition assignment (+=) on
* a text property (such as someTextField.text += moreText),
* particularly for a text field that contains a significant amount of content.
* @param newText The string to append to the existing text.
*/
public appendText (newText:string) {
( this._adaptee).appendText(newText);
}
public copyRichText () : string{
//todo
console.log("copyRichText not implemented yet in flash/TextField");
return "";
}
/**
* Returns a rectangle that is the bounding box of the character.
* @param charIndex The zero-based index value for the character (for example, the first
* position is 0, the second position is 1, and so on).
* @return A rectangle with x and y minimum and maximum values
* defining the bounding box of the character.
*/
public getCharBoundaries (charIndex:number) : Rectangle{
//todo
console.log("getCharBoundaries not implemented yet in flash/TextField");
return null;
}
/**
* Returns the zero-based index value of the character at the point specified by the x
* and y parameters.
* @param x The x coordinate of the character.
* @param y The y coordinate of the character.
* @return The zero-based index value of the character (for example, the first position is 0,
* the second position is 1, and so on). Returns -1 if the point is not over any character.
*/
public getCharIndexAtPoint (x:number, y:number) : number{
//todo
console.log("getCharIndexAtPoint not implemented yet in flash/TextField");
return 0;
}
/**
* Given a character index, returns the index of the first character in the same paragraph.
* @param charIndex The zero-based index value of the character (for example, the first character is 0,
* the second character is 1, and so on).
* @return The zero-based index value of the first character in the same paragraph.
* @throws RangeError The character index specified is out of range.
*/
public getFirstCharInParagraph (charIndex:number) : number{
//todo
console.log("getFirstCharInParagraph not implemented yet in flash/TextField");
return 0;
}
/**
* Returns a DisplayObject reference for the given id, for an image or SWF file
* that has been added to an HTML-formatted text field by using an
tag.
* The
tag is in the following format:
*
*
* @param id The id to match (in the id attribute of the
*
tag).
* @return The display object corresponding to the image or SWF file with the matching id
* attribute in the
tag of the text field. For media loaded from an external source,
* this object is a Loader object, and, once loaded, the media object is a child of that Loader object. For media
* embedded in the SWF file, it is the loaded object. If no
tag with
* the matching id exists, the method returns null.
*/
public getImageReference (id:string) : DisplayObject{
//todo
console.log("getImageReference not implemented yet in flash/TextField");
return null;
}
/**
* Returns the zero-based index value of the line at the point specified by the x
* and y parameters.
* @param x The x coordinate of the line.
* @param y The y coordinate of the line.
* @return The zero-based index value of the line (for example, the first line is 0, the
* second line is 1, and so on). Returns -1 if the point is not over any line.
*/
public getLineIndexAtPoint (x:number, y:number) : number{
//todo
console.log("getLineIndexAtPoint not implemented yet in flash/TextField");
return 0;
}
/**
* Returns the zero-based index value of the line containing the character specified
* by the charIndex parameter.
* @param charIndex The zero-based index value of the character (for example, the first character is 0,
* the second character is 1, and so on).
* @return The zero-based index value of the line.
*/
public getLineIndexOfChar (charIndex:number) : number{
//todo
console.log("getLineIndexOfChar not implemented yet in flash/TextField");
return 0;
}
/**
* Returns the number of characters in a specific text line.
* @param lineIndex The line number for which you want the length.
* @return The number of characters in the line.
* @throws RangeError The line number specified is out of range.
*/
public getLineLength (lineIndex:number) : number{
//todo
console.log("getLineLength not implemented yet in flash/TextField");
return 0;
}
/**
* Returns metrics information about a given text line.
* @param lineIndex The line number for which you want metrics information.
* @return A TextLineMetrics object.
* @throws RangeError The line number specified is out of range.
*/
public getLineMetrics (lineIndex:number) : TextLineMetrics{
//todo
console.log("getLineMetrics not implemented yet in flash/TextField");
return null;
}
/**
* Returns the character index of the first character in the line that
* the lineIndex parameter specifies.
* @param lineIndex The zero-based index value of the line (for example, the first line is 0,
* the second line is 1, and so on).
* @return The zero-based index value of the first character in the line.
* @throws RangeError The line number specified is out of range.
*/
public getLineOffset (lineIndex:number) : number{
//todo
console.log("getLineOffset not implemented yet in flash/TextField");
return 0;
}
/**
* Returns the text of the line specified by the lineIndex parameter.
* @param lineIndex The zero-based index value of the line (for example, the first line is 0,
* the second line is 1, and so on).
* @return The text string contained in the specified line.
* @throws RangeError The line number specified is out of range.
*/
public getLineText (lineIndex:number) : string{
//todo
console.log("getLineText not implemented yet in flash/TextField");
return "";
}
/**
* Given a character index, returns the length of the paragraph containing the given character.
* The length is relative to the first character in the paragraph (as returned by
* getFirstCharInParagraph()), not to the character index passed in.
* @param charIndex The zero-based index value of the character (for example, the first character is 0,
* the second character is 1, and so on).
* @return Returns the number of characters in the paragraph.
* @throws RangeError The character index specified is out of range.
*/
public getParagraphLength (charIndex:number) : number{
//todo
console.log("getParagraphLength not implemented yet in flash/TextField");
return 0;
}
public getRawText () : string{
//todo
console.log("getRawText not implemented yet in flash/TextField");
return "";
}
/**
* Returns a TextFormat object that contains formatting information for the range of text that the
* beginIndex and endIndex parameters specify. Only properties
* that are common to the entire text specified are set in the resulting TextFormat object.
* Any property that is mixed, meaning that it has different values
* at different points in the text, has a value of null.
*
* If you do not specify
* values for these parameters, this method is applied to all the text in the text field. The following table describes three possible usages:UsageDescriptionmy_textField.getTextFormat()Returns a TextFormat object containing formatting information for all text in a text field.
* Only properties that are common to all text in the text field are set in the resulting TextFormat
* object. Any property that is mixed, meaning that it has different values at different
* points in the text, has a value of null.my_textField.getTextFormat(beginIndex:Number)Returns a TextFormat object containing a copy of the text format of the character at the
* beginIndex position.my_textField.getTextFormat(beginIndex:Number,endIndex:Number)Returns a TextFormat object containing formatting information for the span of
* text from beginIndex to endIndex-1. Only properties that are common
* to all of the text in the specified range are set in the resulting TextFormat object. Any property
* that is mixed (that is, has different values at different points in the range) has its value set to null.
* @param beginIndex Optional; an integer that specifies the starting location of a range of text within the text field.
* @param endIndex Optional; an integer that specifies the position of the first character after the desired
* text span. As designed, if you specify beginIndex and endIndex values,
* the text from beginIndex to endIndex-1 is read.
* @return The TextFormat object that represents the formatting properties for the specified text.
* @throws RangeError The beginIndex or endIndex specified is out of range.
*/
public getTextFormat (beginIndex:number=-1, endIndex:number=-1) : TextFormat{
// todo: support multiple formats
return ( this._adaptee).textFormat;
}
public getTextRuns (beginIndex:number=0, endIndex:number=2147483647) : any[]{
//todo
console.log("getTextRuns not implemented yet in flash/TextField");
return [];
}
public getXMLText (beginIndex:number=0, endIndex:number=2147483647) : string{
//todo
console.log("getXMLText not implemented yet in flash/TextField");
return "";
}
public insertXMLText (beginIndex:number, endIndex:number, richText:string, pasting:boolean=false) {
//todo
console.log("insertXMLText not implemented yet in flash/TextField");
}
/**
* Returns true if an embedded font is available with the specified fontName and fontStyle
* where Font.fontType is flash.text.FontType.EMBEDDED. Starting with Flash Player 10,
* two kinds of embedded fonts can appear in a SWF file. Normal embedded fonts are only used with
* TextField objects.
* CFF embedded fonts are only used with the flash.text.engine classes. The two types are distinguished by the
* fontType property of the Font class, as returned by the enumerateFonts() function.
*
* TextField cannot use a font of type EMBEDDED_CFF. If embedFonts is set to true
* and the only font available at run time with the specified name and style is of type EMBEDDED_CFF,
* Flash Player fails to render the text, as if no embedded font were available with the specified name and style.If both EMBEDDED and EMBEDDED_CFF fonts are available with the same name and style, the EMBEDDED
* font is selected and text renders with the EMBEDDED font.
* @param fontName The name of the embedded font to check.
* @param fontStyle Specifies the font style to check. Use flash.text.FontStyle
* @return true if a compatible embedded font is available, otherwise false.
* @throws ArgumentError The fontStyle specified is not a member of flash.text.FontStyle.
*/
public static isFontCompatible (fontName:string, fontStyle:string) : boolean{
//todo
console.log("isFontCompatible not implemented yet in flash/TextField");
return false;
}
public pasteRichText (richText:string) : boolean{
//todo
console.log("pasteRichText not implemented yet in flash/TextField");
return false;
}
/**
* Replaces the current selection with the contents of the value parameter.
* The text is inserted at the position of the current selection, using the current default character
* format and default paragraph format. The text is not treated as HTML.
*
* You can use the replaceSelectedText() method to insert and delete text without disrupting
* the character and paragraph formatting of the rest of the text.Note: This method does not work if a style sheet is applied to the text field.
* @param value The string to replace the currently selected text.
* @throws Error This method cannot be used on a text field with a style sheet.
*/
public replaceSelectedText (value:string) {
//todo
console.log("replaceSelectedText not implemented yet in flash/TextField");
}
/**
* Replaces the range of characters that the beginIndex and
* endIndex parameters specify with the contents
* of the newText parameter. As designed, the text from
* beginIndex to endIndex-1 is replaced.
* Note: This method does not work if a style sheet is applied to the text field.
* @param beginIndex The zero-based index value for the start position of the replacement range.
* @param endIndex The zero-based index position of the first character after the desired
* text span.
* @param newText The text to use to replace the specified range of characters.
* @throws Error This method cannot be used on a text field with a style sheet.
*/
public replaceText (beginIndex:number, endIndex:number, newText:string) {
//todo
console.log("replaceText not implemented yet in flash/TextField");
}
/**
* Sets as selected the text designated by the index values of the
* first and last characters, which are specified with the beginIndex
* and endIndex parameters. If the two parameter values are the same,
* this method sets the insertion point, as if you set the
* caretIndex property.
* @param beginIndex The zero-based index value of the first character in the selection
* (for example, the first character is 0, the second character is 1, and so on).
* @param endIndex The zero-based index value of the last character in the selection.
* @internal Need to add an example.
*/
public setSelection (beginIndex:number, endIndex:number) {
//todo
console.log("setSelection not implemented yet in flash/TextField");
}
/**
* Applies the text formatting that the format parameter specifies to the specified text in a text field.
* The value of format must be a TextFormat object that specifies the
* desired text formatting changes. Only the non-null properties of format are applied
* to the text field. Any property of format that is set to null is not
* applied. By default, all of the properties of a newly created TextFormat object are set to null.
* Note: This method does not work if a style sheet is applied to the text field.The setTextFormat() method changes the text formatting applied to a range of
* characters or to the entire body of text in a text field. To apply the properties of format to all text in the text
* field, do not specify values for beginIndex and endIndex. To apply the
* properties of the format to a range of text, specify values for the beginIndex and
* the endIndex parameters. You can use the length property to determine
* the index values.The two types of formatting information in a TextFormat object are
* character level formatting and paragraph level formatting.
* Each character in a text field can have its own character formatting
* settings, such as font name, font size, bold, and italic.For paragraphs, the first character of the paragraph is examined for the paragraph formatting
* settings for the entire paragraph. Examples of paragraph formatting settings are left margin,
* right margin, and indentation.Any text inserted manually by the user, or replaced by the
* replaceSelectedText() method, receives the default text field formatting for new text,
* and not the formatting specified for the text insertion point. To set the default
* formatting for new text, use defaultTextFormat.
* @param format A TextFormat object that contains character and paragraph formatting information.
* @param beginIndex Optional; an integer that specifies the zero-based index position specifying the
* first character of the desired range of text.
* @param endIndex Optional; an integer that specifies the first character after the desired text span.
* As designed, if you specify beginIndex and endIndex values,
* the text from beginIndex to endIndex-1 is updated.
*
* UsageDescriptionmy_textField.setTextFormat(textFormat:TextFormat)Applies the properties of textFormat to all text in the text
* field.my_textField.setTextFormat(textFormat:TextFormat, beginIndex:int)Applies the properties of textFormat to the text starting with the
* beginIndex position.my_textField.setTextFormat(textFormat:TextFormat, beginIndex:int,
* endIndex:int)Applies the properties of the textFormat parameter to the span of
* text from the beginIndex position to the endIndex-1 position.Notice that any text inserted manually by the user, or replaced by the
* replaceSelectedText() method, receives the default text field formatting for new
* text, and not the formatting specified for the text insertion point. To set a text field's
* default formatting for new text, use the defaultTextFormat property.
* @throws Error This method cannot be used on a text field with a style sheet.
* @throws RangeError The beginIndex or endIndex specified is out of range.
*/
public setTextFormat (format:TextFormat, beginIndex:number=-1, endIndex:number=-1) {
//todo implement for multi-formats
( this._adaptee).setTextFormat(format, beginIndex, endIndex);
}
}