mx.core
public class FlexTextField
继承FlexTextField Inheritance TextField Inheritance InteractiveObject Inheritance DisplayObject Inheritance EventDispatcher Inheritance Object
子类 TextFieldAsset, UITextField

FlexTextField 是 Player 的 TextField 类的子类,同时也是 UITextField 的 superclass。它将覆盖 toString() 方法以返回一个字符串,用于指示对象在应用程序的 DisplayObject 层次结构中所处的位置。



公共属性
 属性定义方
 InheritedaccessibilityProperties : AccessibilityProperties
此显示对象的当前辅助功能选项。
DisplayObject
 Inheritedalpha : Number
指示指定对象的 Alpha 透明度值。
DisplayObject
 InheritedalwaysShowSelection : Boolean
如果设置为 true 且文本字段没有焦点,Flash Player 将以灰色突出显示文本字段中的所选内容。
TextField
 InheritedantiAliasType : String
用于此文本字段的消除锯齿类型。
TextField
 InheritedautoSize : String
控制文本字段的自动大小调整和对齐。
TextField
 Inheritedbackground : Boolean
指定文本字段是否具有背景填充。
TextField
 InheritedbackgroundColor : uint
文本字段背景的颜色。
TextField
 InheritedblendMode : String
BlendMode 类中的一个值,用于指定要使用的混合模式。
DisplayObject
 InheritedblendShader : Shader
[只写] 设置用于混合前景和背景的着色器。
DisplayObject
 Inheritedborder : Boolean
指定文本字段是否具有边框。
TextField
 InheritedborderColor : uint
文本字段边框的颜色。
TextField
 InheritedbottomScrollV : int
[只读 (read-only)] 一个整数(从 1 开始的索引),指示指定文本字段中当前可以看到的最后一行。
TextField
 InheritedcacheAsBitmap : Boolean
如果设置为 true,则 Flash Player 或 Adobe AIR 将缓存显示对象的内部位图表示形式。
DisplayObject
 InheritedcaretIndex : int
[只读 (read-only)] 插入点(尖号)位置的索引。
TextField
 InheritedcondenseWhite : Boolean
一个布尔值,指定是否删除具有 HTML 文本的文本字段中的额外空白(空格、换行符等等)。
TextField
 Inheritedconstructor : Object
对类对象或给定对象实例的构造函数的引用。
Object
 InheritedcontextMenu : NativeMenu
指定与此对象相关联的上下文菜单。
InteractiveObject
 InheriteddefaultTextFormat : TextFormat
指定应用于新插入文本(例如,用户输入的文本或使用 replaceSelectedText() 方法插入的文本)的格式。
TextField
 InheriteddisplayAsPassword : Boolean
指定文本字段是否是密码文本字段。
TextField
 InheriteddoubleClickEnabled : Boolean
指定此对象是否接收 doubleClick 事件。
InteractiveObject
 InheritedembedFonts : Boolean
指定是否使用嵌入字体轮廓进行呈现。
TextField
 Inheritedfilters : Array
包含当前与显示对象关联的每个滤镜对象的索引数组。
DisplayObject
 InheritedfocusRect : Object
指定此对象是否显示焦点矩形。
InteractiveObject
 InheritedgridFitType : String
用于此文本字段的网格固定类型。
TextField
 Inheritedheight : Number
指示显示对象的高度,以像素为单位。
DisplayObject
 InheritedhtmlText : String
包含文本字段内容的 HTML 表示形式。
TextField
 Inheritedlength : int
[只读 (read-only)] 文本字段中的字符数。
TextField
 InheritedloaderInfo : LoaderInfo
[只读 (read-only)] 返回一个 LoaderInfo 对象,其中包含加载此显示对象所属的文件的相关信息。
DisplayObject
 Inheritedmask : DisplayObject
调用显示对象被指定的 mask 对象遮罩。
DisplayObject
 InheritedmaxChars : int
文本字段中最多可包含的字符数(即用户输入的字符数)。
TextField
 InheritedmaxScrollH : int
[只读 (read-only)] scrollH 的最大值。
TextField
 InheritedmaxScrollV : int
[只读 (read-only)] scrollV 的最大值。
TextField
 InheritedmouseEnabled : Boolean
指定此对象是否接收鼠标消息。
InteractiveObject
 InheritedmouseWheelEnabled : Boolean
一个布尔值,指示当用户单击某个文本字段并滚动鼠标滚轮时,Flash Player 是否自动滚动多行文本字段。
TextField
 InheritedmouseX : Number
[只读 (read-only)] 指示鼠标位置的 x 坐标,以像素为单位。
DisplayObject
 InheritedmouseY : Number
[只读 (read-only)] 指示鼠标位置的 y 坐标,以像素为单位。
DisplayObject
 Inheritedmultiline : Boolean
指示字段是否为多行文本字段。
TextField
 Inheritedname : String
指示 DisplayObject 的实例名称。
DisplayObject
 InheritednumLines : int
[只读 (read-only)] 定义多行文本字段中的文本行数。
TextField
 InheritedopaqueBackground : Object
指定显示对象是否由于具有某种背景颜色而不透明。
DisplayObject
 Inheritedparent : DisplayObjectContainer
[只读 (read-only)] 指示包含此显示对象的 DisplayObjectContainer 对象。
DisplayObject
 Inheritedprototype : Object
[静态] 对类或函数对象的原型对象的引用。
Object
 Inheritedrestrict : String
指示用户可输入到文本字段中的字符集。
TextField
 Inheritedroot : DisplayObject
[只读 (read-only)] 对于加载的 SWF 文件中的显示对象,root 属性是此 SWF 文件所表示的显示列表树结构部分中的顶级显示对象。
DisplayObject
 Inheritedrotation : Number
指示 DisplayObject 实例距其原始方向的旋转程度,以度为单位。
DisplayObject
 InheritedrotationX : Number
指示 DisplayObject 实例相对于 3D 父容器距离其原始方向的 x 轴旋转(以度为单位)。
DisplayObject
 InheritedrotationY : Number
指示 DisplayObject 实例相对于 3D 父容器距离其原始方向的 y 轴旋转(以度为单位)。
DisplayObject
 InheritedrotationZ : Number
指示 DisplayObject 实例相对于 3D 父容器距离其原始方向的 z 轴旋转(以度为单位)。
DisplayObject
 Inheritedscale9Grid : Rectangle
当前有效的缩放网格。
DisplayObject
 InheritedscaleX : Number
指示从注册点开始应用的对象的水平缩放比例(百分比)。
DisplayObject
 InheritedscaleY : Number
指示从对象注册点开始应用的对象的垂直缩放比例(百分比)。
DisplayObject
 InheritedscaleZ : Number
指示从对象的注册点开始应用的对象的深度缩放比例(百分比)。
DisplayObject
 InheritedscrollH : int
当前水平滚动位置。
TextField
 InheritedscrollRect : Rectangle
显示对象的滚动矩形范围。
DisplayObject
 InheritedscrollV : int
文本在文本字段中的垂直位置。
TextField
 Inheritedselectable : Boolean
一个布尔值,指示文本字段是否可选。
TextField
 InheritedselectionBeginIndex : int
[只读 (read-only)] 当前所选内容中第一个字符从零开始的字符索引值。
TextField
 InheritedselectionEndIndex : int
[只读 (read-only)] 当前所选内容中最后一个字符从零开始的字符索引值。
TextField
 Inheritedsharpness : Number
此文本字段中字型边缘的清晰度。
TextField
 Inheritedstage : Stage
[只读 (read-only)] 显示对象的舞台。
DisplayObject
 InheritedstyleSheet : StyleSheet
将样式表附加到文本字段。
TextField
 InheritedtabEnabled : Boolean
指定此对象是否遵循 Tab 键顺序。
InteractiveObject
 InheritedtabIndex : int
指定 SWF 文件中的对象按 Tab 键顺序排列。
InteractiveObject
 Inheritedtext : String
作为文本字段中当前文本的字符串。
TextField
 InheritedtextColor : uint
文本字段中文本的颜色(采用十六进制格式)。
TextField
 InheritedtextHeight : Number
[只读 (read-only)] 文本的高度,以像素为单位。
TextField
 InheritedtextWidth : Number
[只读 (read-only)] 文本的宽度,以像素为单位。
TextField
 Inheritedthickness : Number
此文本字段中字型边缘的粗细。
TextField
 Inheritedtransform : Transform
一个对象,具有与显示对象的矩阵、颜色转换和像素范围有关的属性。
DisplayObject
 Inheritedtype : String
文本字段的类型。
TextField
 InheriteduseRichTextClipboard : Boolean
指定在复制和粘贴文本时是否同时复制和粘贴其格式。
TextField
 Inheritedvisible : Boolean
显示对象是否可见。
DisplayObject
 Inheritedwidth : Number
指示显示对象的宽度,以像素为单位。
DisplayObject
 InheritedwordWrap : Boolean
一个布尔值,指示文本字段是否自动换行。
TextField
 Inheritedx : Number
指示 DisplayObject 实例相对于父级 DisplayObjectContainer 本地坐标的 x 坐标。
DisplayObject
 Inheritedy : Number
指示 DisplayObject 实例相对于父级 DisplayObjectContainer 本地坐标的 y 坐标。
DisplayObject
 Inheritedz : Number
指示 DisplayObject 实例相对于 3D 父容器沿 z 轴的 z 坐标位置。
DisplayObject
公共方法
 方法定义方
  
构造函数。
FlexTextField
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
使用 EventDispatcher 对象注册事件侦听器对象,以使侦听器能够接收事件通知。
EventDispatcher
 Inherited
将 newText 参数指定的字符串追加到文本字段的文本的末尾。
TextField
 Inherited
将事件调度到事件流中。
EventDispatcher
 Inherited
getBounds(targetCoordinateSpace:DisplayObject):Rectangle
返回一个矩形,该矩形定义相对于 targetCoordinateSpace 对象坐标系的显示对象区域。
DisplayObject
 Inherited
返回一个矩形,该矩形是字符的边框。
TextField
 Inherited
在 x 和 y 参数指定的位置返回从零开始的字符索引值。
TextField
 Inherited
如果给定一个字符索引,则返回同一段落中第一个字符的索引。
TextField
 Inherited
返回给定 id 或已使用 <img> 标签添加到 HTML 格式文本字段中的图像或 SWF 文件的 DisplayObject 引用。
TextField
 Inherited
在 x 和 y 参数指定的位置返回从零开始的行索引值。
TextField
 Inherited
返回 charIndex 参数指定的字符所在的行的索引值(从零开始)。
TextField
 Inherited
getLineLength(lineIndex:int):int
返回特定文本行中的字符数。
TextField
 Inherited
返回给定文本行的度量信息。
TextField
 Inherited
getLineOffset(lineIndex:int):int
返回 lineIndex 参数指定的行中第一个字符的字符索引。
TextField
 Inherited
返回 lineIndex 参数指定的行的文本。
TextField
 Inherited
如果给定一个字符索引,则返回包含给定字符的段落的长度。
TextField
 Inherited
getRect(targetCoordinateSpace:DisplayObject):Rectangle
返回一个矩形,该矩形根据 targetCoordinateSpace 参数定义的坐标系定义显示对象的边界,但不包括形状上的任何笔触。
DisplayObject
 Inherited
getTextFormat(beginIndex:int = -1, endIndex:int = -1):TextFormat
返回 TextFormat 对象,其中包含 beginIndex 和 endIndex 参数指定的文本范围的格式信息。
TextField
 Inherited
将 point 对象从舞台(全局)坐标转换为显示对象的(本地)坐标。
DisplayObject
 Inherited
将二维点从舞台(全局)坐标转换为三维显示对象的(本地)坐标。
DisplayObject
 Inherited
检查 EventDispatcher 对象是否为特定事件类型注册了任何侦听器。
EventDispatcher
 Inherited
指示对象是否已经定义了指定的属性。
Object
 Inherited
计算显示对象,以确定它是否与 obj 显示对象重叠或相交。
DisplayObject
 Inherited
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
计算显示对象,以确定它是否与 x 和 y 参数指定的点重叠或相交。
DisplayObject
 Inherited
isFontCompatible(fontName:String, fontStyle:String):Boolean
[静态] 如果具有指定的 fontName 和 fontStyle(其中的 Font.fontType 为 flash.text.FontType.EMBEDDED)的嵌入字体可用,则将返回 true。
TextField
 Inherited
指示 Object 类的实例是否在指定为参数的对象的原型链中。
Object
 Inherited
将三维显示对象的(本地)坐标的三维点转换为舞台(全局)坐标中的二维点。
DisplayObject
 Inherited
将 point 对象从显示对象的(本地)坐标转换为舞台(全局)坐标。
DisplayObject
 Inherited
指示指定的属性是否存在、是否可枚举。
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
从 EventDispatcher 对象中删除侦听器。
EventDispatcher
 Inherited
使用 value 参数的内容替换当前所选内容。
TextField
 Inherited
replaceText(beginIndex:int, endIndex:int, newText:String):void
使用 newText 参数的内容替换 beginIndex 和 endIndex 参数指定的字符范围。
TextField
 Inherited
设置循环操作动态属性的可用性。
Object
 Inherited
setSelection(beginIndex:int, endIndex:int):void
将第一个字符和最后一个字符的索引值(使用 beginIndex 和 endIndex 参数指定)指定的文本设置为所选内容。
TextField
 Inherited
setTextFormat(format:TextFormat, beginIndex:int = -1, endIndex:int = -1):void
将 format 参数指定的文本格式应用于文本字段中的指定文本。
TextField
  
返回一个字符串,用于指示此对象在应用程序的 DisplayObject 层次结构中所处的位置。
FlexTextField
 Inherited
返回指定对象的原始值。
Object
 Inherited
检查是否用此 EventDispatcher 对象或其任何始祖为指定事件类型注册了事件侦听器。
EventDispatcher
事件
 事件 摘要 定义方
 Inherited[广播事件] Flash Player 或 AIR 应用程序获得操作系统焦点并变为活动状态时将调度此事件。EventDispatcher
 Inherited将显示对象添加到显示列表中时调度。DisplayObject
 Inherited在将显示对象直接添加到舞台显示列表或将包含显示对象的子树添加至舞台显示列表中时调度。DisplayObject
 Inherited在修改控件值后调度,这与 textInput 事件不同,后者是在修改值之前调度的。TextField
 Inherited当用户从文本上下文菜单中选择“清除”(或“删除”)时调度。InteractiveObject
 Inherited用户在同一 InteractiveObject 上按下并释放用户指针设备的主按钮时调度。InteractiveObject
 Inherited当用户在 AIR 应用程序中选择与此交互式对象相关联的上下文菜单时调度。InteractiveObject
 Inherited当用户激活特定于平台的复制操作的快捷键组合或从文本上下文菜单中选择“复制”时调度。InteractiveObject
 Inherited当用户激活特定于平台的剪切操作的快捷键组合或从文本上下文菜单中选择“剪切”时调度。InteractiveObject
 Inherited[广播事件] Flash Player 或 AIR 应用程序失去操作系统焦点并变为非活动状态时将调度此事件。EventDispatcher
 Inherited如果 InteractiveObject 的 doubleClickEnabled 标志设置为 true,当用户在该对象上快速连续按下两次并释放指针设备的主按钮时调度。InteractiveObject
 Inherited[播放事件] 播放头进入新帧时调度。DisplayObject
 Inherited[广播事件] 播放头退出当前帧时调度。DisplayObject
 Inherited显示对象获得焦点后调度。InteractiveObject
 Inherited显示对象失去焦点后调度。InteractiveObject
 Inherited[广播事件] 在帧显示对象的构造函数运行之后但在帧脚本运行之前调度。DisplayObject
 Inherited用户按下某个键时调度。InteractiveObject
 Inherited用户尝试使用键盘导航更改焦点时调度。InteractiveObject
 Inherited用户释放某个键时调度。InteractiveObject
 Inherited当用户单击启用 HTML 的文本字段中的超链接(其中的 URL 以“event:”开头)时调度。TextField
 Inherited当用户在同一 InteractiveObject 上按下并释放用户指针设备的中间按钮时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上按下指针设备的中间按钮时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上释放指针设备按钮时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上按下指针设备按钮时调度。InteractiveObject
 Inherited用户尝试使用指针设备更改焦点时调度。InteractiveObject
 Inherited用户移动 InteractiveObject 上的指针设备时调度。InteractiveObject
 Inherited用户将指针设备从 InteractiveObject 实例上移开时调度。InteractiveObject
 Inherited用户将指针设备移动到 InteractiveObject 实例上时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上释放指针设备按钮时调度。InteractiveObject
 Inherited当鼠标滚轮滚动到 InteractiveObject 实例上时调度。InteractiveObject
 Inherited当用户释放拖动动作时由拖动启动器 InteractiveObject 调度。InteractiveObject
 Inherited在将拖动对象放置到目标上且已通过对 DragManager.acceptDragDrop() 的调用接受该放置操作时,由目标 InteractiveObject 调度。InteractiveObject
 Inherited当拖动动作进入其边界时由 InteractiveObject 调度。InteractiveObject
 Inherited当拖动动作离开其边界时由 InteractiveObject 调度。InteractiveObject
 Inherited当拖动动作保持在其边界内时,由 InteractiveObject 持续调度。InteractiveObject
 Inherited在拖动操作开始时由在 DragManager.doDrag() 调用中指定为拖动启动器的 InteractiveObject 调度。InteractiveObject
 Inherited在拖动操作期间由在 DragManager.doDrag() 调用中指定为拖动启动器的 InteractiveObject 调度。InteractiveObject
 Inherited当用户激活特定于平台的粘贴操作的快捷键组合或从文本上下文菜单中选择“粘贴”时调度。InteractiveObject
 Inherited将要从显示列表中删除显示对象时调度。DisplayObject
 Inherited在从显示列表中直接删除显示对象或删除包含显示对象的子树时调度。DisplayObject
 Inherited[广播事件] 将要更新和呈现显示列表时调度。DisplayObject
 Inherited当用户在同一 InteractiveObject 上按下并释放用户指针设备的右按钮时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上按下指针设备按钮时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上释放指针设备按钮时调度。InteractiveObject
 Inherited用户将指针设备从 InteractiveObject 实例上移开时调度。InteractiveObject
 Inherited用户将指针设备移动到 InteractiveObject 实例上时调度。InteractiveObject
 Inherited用户滚动后由 TextField 对象调度。TextField
 Inherited当用户激活特定于平台的全选操作的快捷键组合或从文本上下文菜单中选择“全选”时调度。InteractiveObject
 Inherited对象的 tabChildren 标志值发生更改时调度。InteractiveObject
 Inherited对象的 tabEnabled 标志发生更改时调度。InteractiveObject
 Inherited对象的 tabIndex 属性值发生更改时调度。InteractiveObject
 Inherited用户输入一个或多个文本字符时,Flash Player 将调度 textInput 事件。TextField
构造函数详细信息
FlexTextField()构造函数
public function FlexTextField()

构造函数。

name 属性设置为 mx.utils.NameUtils 类的 createUniqueName() 方法返回的字符串。

此字符串由对象的类名称和应用程序内的唯一整数连接而成,如 "UITextField18"

另请参见

方法详细信息
toString()方法
override public function toString():String

返回一个字符串,用于指示此对象在应用程序的 DisplayObject 层次结构中所处的位置。此字符串(如 "MyApp0.HBox5.UITextField18")由 mx.utils.NameUtils 类的 displayObjectToString() 方法从对象及其后代的 name 属性中生成。

返回
String — 指示此对象在应用程序的 DisplayObject 层次结构中所处的位置的 String。

另请参见