Packagemx.core
Interfacepublic interface IUITextField extends IIMESupport , IFlexModule , IInvalidating , ISimpleStyleClient , IToolTipManagerClient , IUIComponent , IFlexDisplayObject , IFlexDisplayObject , IBitmapDrawable , IEventDispatcher
Implementors UITextField

The IUITextField interface defines the basic set of APIs for UITextField instances.



Public Properties
 PropertyDefined By
 InheritedaccessibilityProperties : AccessibilityProperties
The current accessibility options for this display object.
IFlexDisplayObject
 Inheritedalpha : Number
Indicates the alpha transparency value of the object specified.
IFlexDisplayObject
  alwaysShowSelection : Boolean
The ITextField interface defines the basic set of APIs for flash.display.TextField
IUITextField
  antiAliasType : String
The type of anti-aliasing used for this text field.
IUITextField
  autoSize : String
Controls automatic sizing and alignment of text fields.
IUITextField
  background : Boolean
Specifies whether the text field has a background fill.
IUITextField
  backgroundColor : uint
The color of the text field background.
IUITextField
 InheritedbaselinePosition : Number
[read-only] The y-coordinate of the baseline of the first line of text of the component.
IUIComponent
 InheritedblendMode : String
A value from the BlendMode class that specifies which blend mode to use.
IFlexDisplayObject
  border : Boolean
Specifies whether the text field has a border.
IUITextField
  borderColor : uint
The color of the text field border.
IUITextField
  bottomScrollV : int
[read-only] An integer (1-based index) that indicates the bottommost line that is currently visible in the specified text field.
IUITextField
 InheritedcacheAsBitmap : Boolean
If set to true, Flash Player or Adobe AIR caches an internal bitmap representation of the display object.
IFlexDisplayObject
  caretIndex : int
[read-only] The index of the insertion point (caret) position.
IUITextField
  condenseWhite : Boolean
A Boolean value that specifies whether extra white space (spaces, line breaks, and so on) in a text field with HTML text should be removed.
IUITextField
  defaultTextFormat : TextFormat
Specifies the format applied to newly inserted text, such as text inserted with the replaceSelectedText() method or text entered by a user.
IUITextField
  displayAsPassword : Boolean
Specifies whether the text field is a password text field.
IUITextField
 Inheriteddocument : Object
A reference to the document object associated with this component.
IUIComponent
  doubleClickEnabled : Boolean
Specifies whether the object receives doubleClick events.
IUITextField
  embedFonts : Boolean
Specifies whether to render by using embedded font outlines.
IUITextField
 Inheritedenabled : Boolean
Whether the component can accept user interaction.
IUIComponent
 InheritedexplicitHeight : Number
The explicitly specified height for the component, in pixels, as the component's coordinates.
IUIComponent
 InheritedexplicitMaxHeight : Number
[read-only] Number that specifies the maximum height of the component, in pixels, as the component's coordinates.
IUIComponent
 InheritedexplicitMaxWidth : Number
[read-only] Number that specifies the maximum width of the component, in pixels, as the component's coordinates.
IUIComponent
 InheritedexplicitMinHeight : Number
[read-only] Number that specifies the minimum height of the component, in pixels, as the component's coordinates.
IUIComponent
 InheritedexplicitMinWidth : Number
[read-only] Number that specifies the minimum width of the component, in pixels, as the component's coordinates.
IUIComponent
 InheritedexplicitWidth : Number
The explicitly specified width for the component, in pixels, as the component's coordinates.
IUIComponent
 Inheritedfilters : Array
An indexed array that contains each filter object currently associated with the display object.
IFlexDisplayObject
 InheritedfocusPane : Sprite
A single Sprite object that is shared among components and used as an overlay for drawing focus.
IUIComponent
  focusRect : Object
Specifies whether this object displays a focus rectangle.
IUITextField
  gridFitType : String
The type of grid fitting used for this text field.
IUITextField
 Inheritedheight : Number
Indicates the height of the display object, in pixels.
IFlexDisplayObject
  htmlText : String
Contains the HTML representation of the text field's contents.
IUITextField
  ignorePadding : Boolean
If true, the paddingLeft and paddingRight styles will not add space around the text of the component.
IUITextField
 InheritedimeMode : String
The IME mode of the component.
IIMESupport
 InheritedincludeInLayout : Boolean
Specifies whether this component is included in the layout of the parent container.
IUIComponent
  inheritingStyles : Object
The beginning of this UITextField's chain of inheriting styles.
IUITextField
 InheritedisPopUp : Boolean
Set to true by the PopUpManager to indicate that component has been popped up.
IUIComponent
  length : int
[read-only] The number of characters in a text field.
IUITextField
 InheritedloaderInfo : LoaderInfo
[read-only] Returns a LoaderInfo object containing information about loading the file to which this display object belongs.
IFlexDisplayObject
 Inheritedmask : DisplayObject
The calling display object is masked by the specified mask object.
IFlexDisplayObject
  maxChars : int
The maximum number of characters that the text field can contain, as entered by a user.
IUITextField
 InheritedmaxHeight : Number
[read-only] Number that specifies the maximum height of the component, in pixels, as the component's coordinates.
IUIComponent
  maxScrollH : int
[read-only] The maximum value of scrollH.
IUITextField
  maxScrollV : int
[read-only] The maximum value of scrollV.
IUITextField
 InheritedmaxWidth : Number
[read-only] Number that specifies the maximum width of the component, in pixels, as the component's coordinates.
IUIComponent
 InheritedmeasuredHeight : Number
[read-only] The measured height of this object.
IFlexDisplayObject
 InheritedmeasuredMinHeight : Number
The default minimum height of the component, in pixels.
IUIComponent
 InheritedmeasuredMinWidth : Number
The default minimum width of the component, in pixels.
IUIComponent
 InheritedmeasuredWidth : Number
[read-only] The measured width of this object.
IFlexDisplayObject
 InheritedminHeight : Number
[read-only] Number that specifies the minimum height of the component, in pixels, as the component's coordinates.
IUIComponent
 InheritedminWidth : Number
[read-only] Number that specifies the minimum width of the component, in pixels, as the component's coordinates.
IUIComponent
  mouseEnabled : Boolean
Specifies whether this object receives mouse messages.
IUITextField
  mouseWheelEnabled : Boolean
A Boolean value that indicates whether Flash Player should automatically scroll multiline text fields when the user clicks a text field and rolls the mouse wheel.
IUITextField
 InheritedmouseX : Number
[read-only] Indicates the x coordinate of the mouse position, in pixels.
IFlexDisplayObject
 InheritedmouseY : Number
[read-only] Indicates the y coordinate of the mouse position, in pixels.
IFlexDisplayObject
  multiline : Boolean
Indicates whether the text field is a multiline text field.
IUITextField
 Inheritedname : String
Indicates the instance name of the DisplayObject.
IFlexDisplayObject
  nestLevel : int
Depth of this object in the containment hierarchy.
IUITextField
  nonInheritingStyles : Object
The beginning of this UITextField's chain of non-inheriting styles.
IUITextField
  nonZeroTextHeight : Number
[read-only] Unlike textHeight, this returns a non-zero value even when the text is empty.
IUITextField
  numLines : int
[read-only] Defines the number of text lines in a multiline text field.
IUITextField
 InheritedopaqueBackground : Object
Specifies whether the display object is opaque with a certain background color.
IFlexDisplayObject
 Inheritedowner : DisplayObjectContainer
Typically the parent container of this component.
IUIComponent
 Inheritedparent : DisplayObjectContainer
[read-only] Indicates the DisplayObjectContainer object that contains this display object.
IFlexDisplayObject
 InheritedpercentHeight : Number
Number that specifies the height of a component as a percentage of its parent's size.
IUIComponent
 InheritedpercentWidth : Number
Number that specifies the width of a component as a percentage of its parent's size.
IUIComponent
  restrict : String
Indicates the set of characters that a user can enter into the text field.
IUITextField
 Inheritedroot : DisplayObject
[write-only] The methods here would normally just be in IDisplayObject, but for backward compatibility, they have to be included directly into IFlexDisplayObject, so they are kept in this separate include file.
IFlexDisplayObject
 Inheritedrotation : Number
Indicates the rotation of the DisplayObject instance, in degrees, from its original orientation.
IFlexDisplayObject
 Inheritedscale9Grid : Rectangle
The current scaling grid that is in effect.
IFlexDisplayObject
 InheritedscaleX : Number
Indicates the horizontal scale (percentage) of the object as applied from the registration point.
IFlexDisplayObject
 InheritedscaleY : Number
Indicates the vertical scale (percentage) of an object as applied from the registration point of the object.
IFlexDisplayObject
  scrollH : int
The current horizontal scrolling position.
IUITextField
 InheritedscrollRect : Rectangle
The scroll rectangle bounds of the display object.
IFlexDisplayObject
  scrollV : int
The vertical position of text in a text field.
IUITextField
  selectable : Boolean
A Boolean value that indicates whether the text field is selectable.
IUITextField
  selectionBeginIndex : int
[read-only] The zero-based character index value of the first character in the current selection.
IUITextField
  selectionEndIndex : int
[read-only] The zero-based character index value of the last character in the current selection.
IUITextField
  sharpness : Number
The sharpness of the glyph edges in this text field.
IUITextField
 Inheritedstage : Stage
[read-only] The Stage of the display object.
IFlexDisplayObject
 InheritedstyleName : Object
The source of this object's style values.
ISimpleStyleClient
  styleSheet : StyleSheet
Attaches a style sheet to the text field.
IUITextField
 InheritedsystemManager : ISystemManager
A reference to the SystemManager object for this component.
IUIComponent
  tabEnabled : Boolean
The methods here would normally just be in IInteractiveObject, but for backward compatibility, their ancestor methods have to be included directly into IFlexDisplayObject, so these also have to be kept in this separate include file so it can be used in ITextField
IUITextField
  tabIndex : int
Specifies the tab ordering of objects in a SWF file.
IUITextField
  text : String
A string that is the current text in the text field.
IUITextField
  textColor : uint
The color of the text in a text field, in hexadecimal format.
IUITextField
  textHeight : Number
[read-only] The height of the text in pixels.
IUITextField
  textWidth : Number
[read-only] The width of the text in pixels.
IUITextField
  thickness : Number
The thickness of the glyph edges in this text field.
IUITextField
 InheritedtoolTip : String
The text of this component's tooltip.
IToolTipManagerClient
 Inheritedtransform : Transform
An object with properties pertaining to a display object's matrix, color transform, and pixel bounds.
IFlexDisplayObject
 InheritedtweeningProperties : Array
Used by EffectManager.
IUIComponent
  type : String
The type of the text field.
IUITextField
  useRichTextClipboard : Boolean
Specifies whether to copy and paste the text formatting along with the text.
IUITextField
 Inheritedvisible : Boolean
Whether or not the display object is visible.
IFlexDisplayObject
 Inheritedwidth : Number
Indicates the width of the display object, in pixels.
IFlexDisplayObject
  wordWrap : Boolean
A Boolean value that indicates whether the text field has word wrap.
IUITextField
 Inheritedx : Number
Indicates the x coordinate of the DisplayObject instance relative to the local coordinates of the parent DisplayObjectContainer.
IFlexDisplayObject
 Inheritedy : Number
Indicates the y coordinate of the DisplayObject instance relative to the local coordinates of the parent DisplayObjectContainer.
IFlexDisplayObject
Public Methods
 MethodDefined By
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
IEventDispatcher
  
Appends the string specified by the newText parameter to the end of the text of the text field.
IUITextField
 Inherited
Dispatches an event into the event flow.
IEventDispatcher
 Inherited
getBounds(targetCoordinateSpace:DisplayObject):Rectangle
Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object.
IFlexDisplayObject
  
Returns a rectangle that is the bounding box of the character.
IUITextField
  
Returns the zero-based index value of the character at the point specified by the x and y parameters.
IUITextField
 Inherited
A convenience method for determining whether to use the explicit or measured height
IUIComponent
 Inherited
A convenience method for determining whether to use the explicit or measured width
IUIComponent
  
Given a character index, returns the index of the first character in the same paragraph.
IUITextField
  
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 <img> tag.
IUITextField
  
Returns the zero-based index value of the line at the point specified by the x and y parameters.
IUITextField
  
Returns the zero-based index value of the line containing the character specified by the charIndex parameter.
IUITextField
  
getLineLength(lineIndex:int):int
Returns the number of characters in a specific text line.
IUITextField
  
Returns metrics information about a given text line.
IUITextField
  
getLineOffset(lineIndex:int):int
Returns the character index of the first character in the line that the lineIndex parameter specifies.
IUITextField
  
getLineText(lineIndex:int):String
Returns the text of the line specified by the lineIndex parameter.
IUITextField
  
Given a character index, returns the length of the paragraph containing the given character.
IUITextField
 Inherited
getRect(targetCoordinateSpace:DisplayObject):Rectangle
Returns a rectangle that defines the boundary of the display object, based on the coordinate system defined by the targetCoordinateSpace parameter, excluding any strokes on shapes.
IFlexDisplayObject
  
getStyle(styleProp:String):*
Gets a style property that has been set anywhere in this component's style lookup chain.
IUITextField
  
getTextFormat(beginIndex:int = -1, endIndex:int = -1):TextFormat
Returns a TextFormat object that contains formatting information for the range of text that the beginIndex and endIndex parameters specify.
IUITextField
  
Returns a UITextFormat object that contains formatting information for this component.
IUITextField
 Inherited
Converts the point object from the Stage (global) coordinates to the display object's (local) coordinates.
IFlexDisplayObject
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
IEventDispatcher
 Inherited
Evaluates the display object to see if it overlaps or intersects with the obj display object.
IFlexDisplayObject
 Inherited
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
Evaluates the display object to see if it overlaps or intersects with the point specified by the x and y parameters.
IFlexDisplayObject
 Inherited
Initialize the object.
IUIComponent
 Inherited
Calling this method results in a call to the component's validateDisplayList() method before the display list is rendered.
IInvalidating
 Inherited
Calling this method results in a call to the component's validateProperties() method before the display list is rendered.
IInvalidating
 Inherited
Calling this method results in a call to the component's validateSize() method before the display list is rendered.
IInvalidating
 Inherited
Converts the point object from the display object's (local) coordinates to the Stage (global) coordinates.
IFlexDisplayObject
 Inherited
Moves this object to the specified x and y coordinates.
IFlexDisplayObject
 Inherited
Returns true if the chain of owner properties points from child to this UIComponent.
IUIComponent
 Inherited
Called by Flex when a UIComponent object is added to or removed from a parent.
IUIComponent
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
IEventDispatcher
  
Replaces the current selection with the contents of the value parameter.
IUITextField
  
replaceText(beginIndex:int, endIndex:int, newText:String):void
Replaces the range of characters that the beginIndex and endIndex parameters specify with the contents of the newText parameter.
IUITextField
 Inherited
setActualSize(newWidth:Number, newHeight:Number):void
Sets the actual size of this object.
IFlexDisplayObject
  
setColor(color:uint):void
Sets the font color of the text.
IUITextField
  
Sets the focus to this component.
IUITextField
  
setSelection(beginIndex:int, endIndex:int):void
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.
IUITextField
  
setTextFormat(format:TextFormat, beginIndex:int = -1, endIndex:int = -1):void
Applies the text formatting that the format parameter specifies to the specified text in a text field.
IUITextField
 Inherited
setVisible(value:Boolean, noEvent:Boolean = false):void
Called when the visible property changes.
IUIComponent
 Inherited
styleChanged(styleProp:String):void
Called when the value of a style property is changed.
ISimpleStyleClient
  
truncateToFit(truncationIndicator:String = null):Boolean
Truncate text to make it fit horizontally in the area defined for the control, and append an ellipsis, three periods (...), to the text.
IUITextField
 Inherited
Validates and updates the properties and layout of this object by immediately calling validateProperties(), validateSize(), and validateDisplayList(), if necessary.
IInvalidating
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
IEventDispatcher
Property Detail
alwaysShowSelectionproperty
public var alwaysShowSelection:Boolean

The ITextField interface defines the basic set of APIs for flash.display.TextField

antiAliasTypeproperty 
antiAliasType:String  [read-write]

The type of anti-aliasing used for this text field. Use flash.text.AntiAliasType constants for this property. You can control this setting only if the font is embedded (with the embedFonts property set to true). The default setting is flash.text.AntiAliasType.NORMAL.

To set values for this property, use the following string values:

String valueDescription
flash.text.AntiAliasType.NORMALApplies the regular text anti-aliasing. This matches the type of anti-aliasing that Flash Player 7 and earlier versions used.
flash.text.AntiAliasType.ADVANCEDApplies advanced anti-aliasing, which makes text more legible. (This feature became available in Flash Player 8.) Advanced anti-aliasing allows for high-quality rendering of font faces at small sizes. It is best used with applications that have a lot of small text. Advanced anti-aliasing is not recommended for fonts that are larger than 48 points.


Implementation
    public function get antiAliasType():String
    public function set antiAliasType(value:String):void
autoSizeproperty 
autoSize:String  [read-write]

Controls automatic sizing and alignment of text fields. Acceptable values for the TextFieldAutoSize constants: TextFieldAutoSize.NONE (the default), TextFieldAutoSize.LEFT, TextFieldAutoSize.RIGHT, and TextFieldAutoSize.CENTER.

If autoSize is set to TextFieldAutoSize.NONE (the default) no resizing occurs.

If autoSize is set to TextFieldAutoSize.LEFT, the text is treated as left-justified text, meaning that the left margin of the text field remains fixed and any resizing of a single line of the text field is on the right margin. If the text includes a line break (for example, "\n" or "\r"), the bottom is also resized to fit the next line of text. If wordWrap is also set to true, only the bottom of the text field is resized and the right side remains fixed.

If autoSize is set to TextFieldAutoSize.RIGHT, the text is treated as right-justified text, meaning that the right margin of the text field remains fixed and any resizing of a single line of the text field is on the left margin. If the text includes a line break (for example, "\n" or "\r"), the bottom is also resized to fit the next line of text. If wordWrap is also set to true, only the bottom of the text field is resized and the left side remains fixed.

If autoSize is set to TextFieldAutoSize.CENTER, the text is treated as center-justified text, meaning that any resizing of a single line of the text field is equally distributed to both the right and left margins. If the text includes a line break (for example, "\n" or "\r"), the bottom is also resized to fit the next line of text. If wordWrap is also set to true, only the bottom of the text field is resized and the left and right sides remain fixed.


Implementation
    public function get autoSize():String
    public function set autoSize(value:String):void
backgroundproperty 
background:Boolean  [read-write]

Specifies whether the text field has a background fill. If true, the text field has a background fill. If false, the text field has no background fill. Use the backgroundColor property to set the background color of a text field.


Implementation
    public function get background():Boolean
    public function set background(value:Boolean):void
backgroundColorproperty 
backgroundColor:uint  [read-write]

The color of the text field background. The default value is 0xFFFFFF (white). This property can be retrieved or set, even if there currently is no background, but the color is visible only if the text field has the background property set to true.


Implementation
    public function get backgroundColor():uint
    public function set backgroundColor(value:uint):void
borderproperty 
border:Boolean  [read-write]

Specifies whether the text field has a border. If true, the text field has a border. If false, the text field has no border. Use the borderColor property to set the border color.


Implementation
    public function get border():Boolean
    public function set border(value:Boolean):void
borderColorproperty 
borderColor:uint  [read-write]

The color of the text field border. The default value is 0x000000 (black). This property can be retrieved or set, even if there currently is no border, but the color is visible only if the text field has the border property set to true.


Implementation
    public function get borderColor():uint
    public function set borderColor(value:uint):void
bottomScrollVproperty 
bottomScrollV:int  [read-only]

An integer (1-based index) that indicates the bottommost line that is currently visible in the specified text field. Think of the text field as a window onto a block of text. The scrollV property is the 1-based index of the topmost visible line in the window.

All the text between the lines indicated by scrollV and bottomScrollV is currently visible in the text field.


Implementation
    public function get bottomScrollV():int
caretIndexproperty 
caretIndex:int  [read-only]

The index of the insertion point (caret) position. If no insertion point is displayed, the value is the position the insertion point would be if you restored focus to the field (typically where the insertion point last was, or 0 if the field has not had focus).

Selection span indexes are zero-based (for example, the first position is 0, the second position is 1, and so on).


Implementation
    public function get caretIndex():int
condenseWhiteproperty 
condenseWhite:Boolean  [read-write]

A Boolean value that specifies whether extra white space (spaces, line breaks, and so on) in a text field with HTML text should be removed. The default value is false. The condenseWhite property only affects text set with the htmlText property, not the text property. If you set text with the text property, condenseWhite is ignored.

If you set condenseWhite to true, you must use standard HTML commands such as <BR> and <P> to place line breaks in the text field.

Set the condenseWhite property before setting the htmlText property.


Implementation
    public function get condenseWhite():Boolean
    public function set condenseWhite(value:Boolean):void
defaultTextFormatproperty 
defaultTextFormat:TextFormat  [read-write]

Specifies the format applied to newly inserted text, such as text inserted with the replaceSelectedText() method or text entered by a user.

When you access the defaultTextFormat property, the returned TextFormat object has all of its properties defined. No property is null.

Note: You can't set this property if a style sheet is applied to the text field.


Implementation
    public function get defaultTextFormat():TextFormat
    public function set defaultTextFormat(value:TextFormat):void
displayAsPasswordproperty 
displayAsPassword:Boolean  [read-write]

Specifies whether the text field is a password text field. If the value of this property is true, the text field is treated as a password text field and hides the input characters using asterisks instead of the actual characters. If false, the text field is not treated as a password text field. When password mode is enabled, the Cut and Copy commands and their corresponding keyboard shortcuts will not function. This security mechanism prevents an unscrupulous user from using the shortcuts to discover a password on an unattended computer.


Implementation
    public function get displayAsPassword():Boolean
    public function set displayAsPassword(value:Boolean):void
doubleClickEnabledproperty 
doubleClickEnabled:Boolean  [read-write]

Specifies whether the object receives doubleClick events. The default value is false, which means that by default an InteractiveObject instance does not receive doubleClick events. If the doubleClickEnabled property is set to true, the instance receives doubleClick events within its bounds. The mouseEnabled property of the InteractiveObject instance must also be set to true for the object to receive doubleClick events.

No event is dispatched by setting this property. You must use the addEventListener() method to add an event listener for the doubleClick event.


Implementation
    public function get doubleClickEnabled():Boolean
    public function set doubleClickEnabled(value:Boolean):void
embedFontsproperty 
embedFonts:Boolean  [read-write]

Specifies whether to render by using embedded font outlines. If false, Flash Player renders the text field by using device fonts.

If you set the embedFonts property to true for a text field, you must specify a font for that text by using the font property of a TextFormat object applied to the text field. If the specified font is not embedded in the SWF file, the text is not displayed.


Implementation
    public function get embedFonts():Boolean
    public function set embedFonts(value:Boolean):void
focusRectproperty 
focusRect:Object  [read-write]

Specifies whether this object displays a focus rectangle. A value of null indicates that this object obeys the stageFocusRect property set on the Stage.


Implementation
    public function get focusRect():Object
    public function set focusRect(value:Object):void
gridFitTypeproperty 
gridFitType:String  [read-write]

The type of grid fitting used for 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 type of grid fitting used determines whether Flash Player forces strong horizontal and vertical lines to fit to a pixel or subpixel grid, or not at all.

For the flash.text.GridFitType property, you can use the following string values:

String valueDescription
flash.text.GridFitType.NONESpecifies no grid fitting. Horizontal and vertical lines in the glyphs are not forced to the pixel grid. This setting is usually good for animation or for large font sizes.
flash.text.GridFitType.PIXELSpecifies that strong horizontal and vertical lines are fit to the pixel grid. This setting works only for left-aligned text fields. To use this setting, the flash.dispaly.AntiAliasType property of the text field must be set to flash.text.AntiAliasType.ADVANCED. This setting generally provides the best legibility for left-aligned text.
flash.text.GridFitType.SUBPIXELSpecifies that strong horizontal and vertical lines are fit to the subpixel grid on an LCD monitor. To use this setting, the flash.text.AntiAliasType property of the text field must be set to flash.text.AntiAliasType.ADVANCED. The flash.text.GridFitType.SUBPIXEL setting is often good for right-aligned or centered dynamic text, and it is sometimes a useful trade-off for animation versus text quality.


Implementation
    public function get gridFitType():String
    public function set gridFitType(value:String):void
htmlTextproperty 
htmlText:String  [read-write]

Contains the HTML representation of the text field's contents.

Flash Player supports the following HTML tags:

Tag Description
Anchor tag The <a> tag creates a hypertext link and supports the following attributes:
  • target: Specifies the name of the target window where you load the page. Options include _self, _blank, _parent, and _top. The _self option specifies the current frame in the current window, _blank specifies a new window, _parent specifies the parent of the current frame, and _top specifies the top-level frame in the current window.
  • href: Specifies a URL or an ActionScript link event.The URL can be either absolute or relative to the location of the SWF file that is loading the page. An example of an absolute reference to a URL is http://www.adobe.com; an example of a relative reference is /index.html. Absolute URLs must be prefixed with http://; otherwise, Flash treats them as relative URLs. You can use the link event to cause the link to execute an ActionScript function in a SWF file instead of opening a URL. To specify a link event, use the event scheme instead of the http scheme in your href attribute. An example is href="event:myText" instead of href="http://myURL"; when the user clicks a hypertext link that contains the event scheme, the text field dispatches a link TextEvent with its text property set to "myText". You can then create an ActionScript function that executes whenever the link TextEvent is dispatched. You can also define a:link, a:hover, and a:active styles for anchor tags by using style sheets.
Bold tag The <b> tag renders text as bold. A bold typeface must be available for the font used.
Break tag The <br> tag creates a line break in the text field. You must set the text field to be a multiline text field to use this tag.
Font tag The <font> tag specifies a font or list of fonts to display the text.The font tag supports the following attributes:
  • color: Only hexadecimal color (#FFFFFF) values are supported.
  • face: Specifies the name of the font to use. As shown in the following example, you can specify a list of comma-delimited font names, in which case Flash Player selects the first available font. If the specified font is not installed on the user's computer system or isn't embedded in the SWF file, Flash Player selects a substitute font.
  • size: Specifies the size of the font. You can use absolute pixel sizes, such as 16 or 18, or relative point sizes, such as +2 or -4.
Image tag The <img> tag lets you embed external image files (JPEG, GIF, PNG), SWF files, and movie clips inside text fields. Text automatically flows around images you embed in text fields. To use this tag, you must set the text field to be multiline and to wrap text.

The <img> tag supports the following attributes:

  • src: Specifies the URL to an image or SWF file, or the linkage identifier for a movie clip symbol in the library. This attribute is required; all other attributes are optional. External files (JPEG, GIF, PNG, and SWF files) do not show until they are downloaded completely.
  • width: The width of the image, SWF file, or movie clip being inserted, in pixels.
  • height: The height of the image, SWF file, or movie clip being inserted, in pixels.
  • align: Specifies the horizontal alignment of the embedded image within the text field. Valid values are left and right. The default value is left.
  • hspace: Specifies the amount of horizontal space that surrounds the image where no text appears. The default value is 8.
  • vspace: Specifies t