適用於 Adobe® Flash® Platform 的 ActionScript® 3.0 參考
首頁  |  隱藏套件和類別清單 |  套件  |  類別  |  新增內容  |  索引  |  附錄  |  為什麼顯示英文?
篩選: AIR 30.0 和更早版本, Flash Player 30.0 和更早版本, Flash Lite 4
Flex 4.6 和更早版本, Flash Pro CS6 和更早版本
隱藏篩選
mx.core 

IUITextField  - AS3 Flex

套件x

最上層
adobe.utils
air.desktop
air.net
air.update
air.update.events
coldfusion.air
coldfusion.air.errors
coldfusion.air.events
coldfusion.service
coldfusion.service.events
coldfusion.service.mxml
com.adobe.acm.solutions.authoring.domain.extensions
com.adobe.acm.solutions.ccr.domain.extensions
com.adobe.consulting.pst.vo
com.adobe.dct.component
com.adobe.dct.component.datadictionary
com.adobe.dct.component.datadictionaryElement
com.adobe.dct.component.dataElementsPanel
com.adobe.dct.component.toolbars
com.adobe.dct.event
com.adobe.dct.exp
com.adobe.dct.model
com.adobe.dct.service
com.adobe.dct.service.provider
com.adobe.dct.transfer
com.adobe.dct.util
com.adobe.dct.view
com.adobe.ep.taskmanagement.domain
com.adobe.ep.taskmanagement.event
com.adobe.ep.taskmanagement.filter
com.adobe.ep.taskmanagement.services
com.adobe.ep.taskmanagement.util
com.adobe.ep.ux.attachmentlist.component
com.adobe.ep.ux.attachmentlist.domain
com.adobe.ep.ux.attachmentlist.domain.events
com.adobe.ep.ux.attachmentlist.domain.renderers
com.adobe.ep.ux.attachmentlist.skin
com.adobe.ep.ux.attachmentlist.skin.renderers
com.adobe.ep.ux.content.event
com.adobe.ep.ux.content.factory
com.adobe.ep.ux.content.handlers
com.adobe.ep.ux.content.managers
com.adobe.ep.ux.content.model.asset
com.adobe.ep.ux.content.model.preview
com.adobe.ep.ux.content.model.relation
com.adobe.ep.ux.content.model.search
com.adobe.ep.ux.content.model.toolbar
com.adobe.ep.ux.content.search
com.adobe.ep.ux.content.services
com.adobe.ep.ux.content.services.load
com.adobe.ep.ux.content.services.permissions
com.adobe.ep.ux.content.services.preview
com.adobe.ep.ux.content.services.providers
com.adobe.ep.ux.content.services.query
com.adobe.ep.ux.content.services.relationships
com.adobe.ep.ux.content.services.search.lccontent
com.adobe.ep.ux.content.services.version
com.adobe.ep.ux.content.view
com.adobe.ep.ux.content.view.components.activate
com.adobe.ep.ux.content.view.components.grid
com.adobe.ep.ux.content.view.components.grid.hover
com.adobe.ep.ux.content.view.components.grid.hover.component
com.adobe.ep.ux.content.view.components.grid.renderers
com.adobe.ep.ux.content.view.components.relationships
com.adobe.ep.ux.content.view.components.review
com.adobe.ep.ux.content.view.components.search.renderers
com.adobe.ep.ux.content.view.components.searchpod
com.adobe.ep.ux.content.view.components.toolbar
com.adobe.ep.ux.content.view.components.toolbar.controlRenderers
com.adobe.ep.ux.content.view.components.version
com.adobe.ep.ux.documentsubmit.component
com.adobe.ep.ux.documentsubmit.domain
com.adobe.ep.ux.documentsubmit.skin
com.adobe.ep.ux.taskaction.component
com.adobe.ep.ux.taskaction.domain
com.adobe.ep.ux.taskaction.domain.events
com.adobe.ep.ux.taskaction.skin
com.adobe.ep.ux.taskdetails.component
com.adobe.ep.ux.taskdetails.domain
com.adobe.ep.ux.taskdetails.skin
com.adobe.ep.ux.tasklist.component
com.adobe.ep.ux.tasklist.domain
com.adobe.ep.ux.tasklist.skin
com.adobe.ep.ux.webdocumentviewer.domain
com.adobe.exm.expression
com.adobe.exm.expression.error
com.adobe.exm.expression.event
com.adobe.exm.expression.impl
com.adobe.fiber.runtime.lib
com.adobe.fiber.services
com.adobe.fiber.services.wrapper
com.adobe.fiber.styles
com.adobe.fiber.util
com.adobe.fiber.valueobjects
com.adobe.gravity.binding
com.adobe.gravity.context
com.adobe.gravity.flex.bundleloader
com.adobe.gravity.flex.progress
com.adobe.gravity.flex.serviceloader
com.adobe.gravity.framework
com.adobe.gravity.init
com.adobe.gravity.service.bundleloader
com.adobe.gravity.service.logging
com.adobe.gravity.service.manifest
com.adobe.gravity.service.progress
com.adobe.gravity.tracker
com.adobe.gravity.ui
com.adobe.gravity.utility
com.adobe.gravity.utility.async
com.adobe.gravity.utility.error
com.adobe.gravity.utility.events
com.adobe.gravity.utility.factory
com.adobe.gravity.utility.flex.async
com.adobe.gravity.utility.logging
com.adobe.gravity.utility.message
com.adobe.gravity.utility.sequence
com.adobe.gravity.utility.url
com.adobe.guides.control
com.adobe.guides.domain
com.adobe.guides.i18n
com.adobe.guides.spark.components.skins
com.adobe.guides.spark.components.skins.mx
com.adobe.guides.spark.headers.components
com.adobe.guides.spark.headers.skins
com.adobe.guides.spark.layouts.components
com.adobe.guides.spark.layouts.skins
com.adobe.guides.spark.navigators.components
com.adobe.guides.spark.navigators.renderers
com.adobe.guides.spark.navigators.skins
com.adobe.guides.spark.util
com.adobe.guides.spark.wrappers.components
com.adobe.guides.spark.wrappers.skins
com.adobe.guides.submit
com.adobe.icc.dc.domain
com.adobe.icc.dc.domain.factory
com.adobe.icc.editors.events
com.adobe.icc.editors.handlers
com.adobe.icc.editors.managers
com.adobe.icc.editors.model
com.adobe.icc.editors.model.config
com.adobe.icc.editors.model.el
com.adobe.icc.editors.model.el.operands
com.adobe.icc.editors.model.el.operators
com.adobe.icc.enum
com.adobe.icc.external.dc
com.adobe.icc.obj
com.adobe.icc.services
com.adobe.icc.services.category
com.adobe.icc.services.config
com.adobe.icc.services.download
com.adobe.icc.services.export
com.adobe.icc.services.external
com.adobe.icc.services.formbridge
com.adobe.icc.services.fragmentlayout
com.adobe.icc.services.layout
com.adobe.icc.services.letter
com.adobe.icc.services.locator
com.adobe.icc.services.module
com.adobe.icc.services.render
com.adobe.icc.services.submit
com.adobe.icc.services.user
com.adobe.icc.token
com.adobe.icc.vo
com.adobe.icc.vo.render
com.adobe.icomm.assetplacement.controller
com.adobe.icomm.assetplacement.controller.utils
com.adobe.icomm.assetplacement.data
com.adobe.icomm.assetplacement.model
com.adobe.livecycle.assetmanager.client
com.adobe.livecycle.assetmanager.client.event
com.adobe.livecycle.assetmanager.client.handler
com.adobe.livecycle.assetmanager.client.managers
com.adobe.livecycle.assetmanager.client.model
com.adobe.livecycle.assetmanager.client.model.cms
com.adobe.livecycle.assetmanager.client.service
com.adobe.livecycle.assetmanager.client.service.search
com.adobe.livecycle.assetmanager.client.service.search.cms
com.adobe.livecycle.assetmanager.client.utils
com.adobe.livecycle.content
com.adobe.livecycle.rca.model
com.adobe.livecycle.rca.model.constant
com.adobe.livecycle.rca.model.document
com.adobe.livecycle.rca.model.participant
com.adobe.livecycle.rca.model.reminder
com.adobe.livecycle.rca.model.stage
com.adobe.livecycle.rca.service
com.adobe.livecycle.rca.service.core
com.adobe.livecycle.rca.service.core.delegate
com.adobe.livecycle.rca.service.process
com.adobe.livecycle.rca.service.process.delegate
com.adobe.livecycle.rca.token
com.adobe.livecycle.ria.security.api
com.adobe.livecycle.ria.security.service
com.adobe.mosaic.layouts
com.adobe.mosaic.layouts.dragAndDrop
com.adobe.mosaic.layouts.interfaces
com.adobe.mosaic.mxml
com.adobe.mosaic.om.constants
com.adobe.mosaic.om.events
com.adobe.mosaic.om.impl
com.adobe.mosaic.om.interfaces
com.adobe.mosaic.skinning
com.adobe.mosaic.sparklib.editors
com.adobe.mosaic.sparklib.optionMenu
com.adobe.mosaic.sparklib.scrollableMenu
com.adobe.mosaic.sparklib.scrollableMenu.skins
com.adobe.mosaic.sparklib.tabLayout
com.adobe.mosaic.sparklib.tabLayout.events
com.adobe.mosaic.sparklib.tabLayout.layouts
com.adobe.mosaic.sparklib.tabLayout.skins
com.adobe.mosaic.sparklib.text
com.adobe.mosaic.sparklib.util
com.adobe.solutions.acm.authoring.presentation
com.adobe.solutions.acm.authoring.presentation.actionbar
com.adobe.solutions.acm.authoring.presentation.common
com.adobe.solutions.acm.authoring.presentation.events
com.adobe.solutions.acm.authoring.presentation.fragment
com.adobe.solutions.acm.authoring.presentation.letter
com.adobe.solutions.acm.authoring.presentation.letter.data
com.adobe.solutions.acm.authoring.presentation.preview
com.adobe.solutions.acm.authoring.presentation.rte
com.adobe.solutions.acm.ccr.presentation
com.adobe.solutions.acm.ccr.presentation.contentcapture
com.adobe.solutions.acm.ccr.presentation.contentcapture.events
com.adobe.solutions.acm.ccr.presentation.contentcapture.preview
com.adobe.solutions.acm.ccr.presentation.datacapture
com.adobe.solutions.acm.ccr.presentation.datacapture.renderers
com.adobe.solutions.acm.ccr.presentation.pdf
com.adobe.solutions.exm
com.adobe.solutions.exm.authoring
com.adobe.solutions.exm.authoring.components.controls
com.adobe.solutions.exm.authoring.components.toolbars
com.adobe.solutions.exm.authoring.domain
com.adobe.solutions.exm.authoring.domain.expression
com.adobe.solutions.exm.authoring.domain.impl
com.adobe.solutions.exm.authoring.domain.method
com.adobe.solutions.exm.authoring.domain.variable
com.adobe.solutions.exm.authoring.enum
com.adobe.solutions.exm.authoring.events
com.adobe.solutions.exm.authoring.model
com.adobe.solutions.exm.authoring.renderer
com.adobe.solutions.exm.authoring.view
com.adobe.solutions.exm.expression
com.adobe.solutions.exm.impl
com.adobe.solutions.exm.impl.method
com.adobe.solutions.exm.method
com.adobe.solutions.exm.mock
com.adobe.solutions.exm.mock.method
com.adobe.solutions.exm.runtime
com.adobe.solutions.exm.runtime.impl
com.adobe.solutions.exm.variable
com.adobe.solutions.prm.constant
com.adobe.solutions.prm.domain
com.adobe.solutions.prm.domain.factory
com.adobe.solutions.prm.domain.impl
com.adobe.solutions.prm.domain.manager
com.adobe.solutions.prm.presentation.asset
com.adobe.solutions.prm.presentation.constant
com.adobe.solutions.prm.presentation.document
com.adobe.solutions.prm.presentation.event
com.adobe.solutions.prm.presentation.file
com.adobe.solutions.prm.presentation.project
com.adobe.solutions.prm.presentation.team
com.adobe.solutions.prm.presentation.util
com.adobe.solutions.prm.service
com.adobe.solutions.prm.services.impl
com.adobe.solutions.prm.vo
com.adobe.solutions.rca.constant
com.adobe.solutions.rca.domain
com.adobe.solutions.rca.domain.common
com.adobe.solutions.rca.domain.factory
com.adobe.solutions.rca.domain.impl
com.adobe.solutions.rca.domain.impl.manager
com.adobe.solutions.rca.domain.manager
com.adobe.solutions.rca.presentation
com.adobe.solutions.rca.presentation.comment
com.adobe.solutions.rca.presentation.constant
com.adobe.solutions.rca.presentation.event
com.adobe.solutions.rca.presentation.gantt
com.adobe.solutions.rca.presentation.gantt.ruler
com.adobe.solutions.rca.presentation.template
com.adobe.solutions.rca.presentation.template.audit
com.adobe.solutions.rca.presentation.template.definition
com.adobe.solutions.rca.presentation.template.documents
com.adobe.solutions.rca.presentation.template.stages
com.adobe.solutions.rca.presentation.util
com.adobe.solutions.rca.service
com.adobe.solutions.rca.services.impl
com.adobe.solutions.rca.vo
com.adobe.solutions.rca.vo.um
com.adobe.viewsource
fl.accessibility
fl.containers
fl.controls
fl.controls.dataGridClasses
fl.controls.listClasses
fl.controls.progressBarClasses
fl.core
fl.data
fl.display
fl.events
fl.ik
fl.lang
fl.livepreview
fl.managers
fl.motion
fl.motion.easing
fl.rsl
fl.text
fl.transitions
fl.transitions.easing
fl.video
flash.accessibility
flash.concurrent
flash.crypto
flash.data
flash.desktop
flash.display
flash.display3D
flash.display3D.textures
flash.errors
flash.events
flash.external
flash.filesystem
flash.filters
flash.geom
flash.globalization
flash.html
flash.media
flash.net
flash.net.dns
flash.net.drm
flash.notifications
flash.permissions
flash.printing
flash.profiler
flash.sampler
flash.security
flash.sensors
flash.system
flash.text
flash.text.engine
flash.text.ime
flash.ui
flash.utils
flash.xml
flashx.textLayout
flashx.textLayout.compose
flashx.textLayout.container
flashx.textLayout.conversion
flashx.textLayout.edit
flashx.textLayout.elements
flashx.textLayout.events
flashx.textLayout.factory
flashx.textLayout.formats
flashx.textLayout.operations
flashx.textLayout.utils
flashx.undo
ga.controls
ga.layouts
ga.model
ga.uiComponents
ga.util
ga.views
ga.wrappers
lc.foundation
lc.foundation.domain
lc.foundation.events
lc.foundation.ui
lc.foundation.util
lc.preloader
lc.procmgmt
lc.procmgmt.commands
lc.procmgmt.domain
lc.procmgmt.events
lc.procmgmt.formbridge
lc.procmgmt.impl
lc.procmgmt.ui.attachments
lc.procmgmt.ui.controls
lc.procmgmt.ui.controls.card
lc.procmgmt.ui.controls.renderer
lc.procmgmt.ui.help
lc.procmgmt.ui.layout
lc.procmgmt.ui.presentationmodel
lc.procmgmt.ui.process
lc.procmgmt.ui.search
lc.procmgmt.ui.startpoint
lc.procmgmt.ui.task
lc.procmgmt.ui.task.form
lc.procmgmt.ui.task.form.commands
lc.procmgmt.ui.tracking
mx.accessibility
mx.automation
mx.automation.air
mx.automation.delegates
mx.automation.delegates.advancedDataGrid
mx.automation.delegates.charts
mx.automation.delegates.containers
mx.automation.delegates.controls
mx.automation.delegates.controls.dataGridClasses
mx.automation.delegates.controls.fileSystemClasses
mx.automation.delegates.core
mx.automation.delegates.flashflexkit
mx.automation.events
mx.binding
mx.binding.utils
mx.charts
mx.charts.chartClasses
mx.charts.effects
mx.charts.effects.effectClasses
mx.charts.events
mx.charts.renderers
mx.charts.series
mx.charts.series.items
mx.charts.series.renderData
mx.charts.styles
mx.collections
mx.collections.errors
mx.containers
mx.containers.accordionClasses
mx.containers.dividedBoxClasses
mx.containers.errors
mx.containers.utilityClasses
mx.controls
mx.controls.advancedDataGridClasses
mx.controls.dataGridClasses
mx.controls.listClasses
mx.controls.menuClasses
mx.controls.olapDataGridClasses
mx.controls.scrollClasses
mx.controls.sliderClasses
mx.controls.textClasses
mx.controls.treeClasses
mx.controls.videoClasses
mx.core
mx.core.windowClasses
mx.data
mx.data.crypto
mx.data.errors
mx.data.events
mx.data.messages
mx.data.mxml
mx.data.offline.errors
mx.data.utils
mx.effects
mx.effects.easing
mx.effects.effectClasses
mx.events
mx.filters
mx.flash
mx.formatters
mx.geom
mx.graphics
mx.graphics.codec
mx.graphics.shaderClasses
mx.logging
mx.logging.errors
mx.logging.targets
mx.managers
mx.messaging
mx.messaging.channels
mx.messaging.config
mx.messaging.errors
mx.messaging.events
mx.messaging.management
mx.messaging.messages
mx.modules
mx.netmon
mx.olap
mx.olap.aggregators
mx.preloaders
mx.printing
mx.resources
mx.rpc
mx.rpc.events
mx.rpc.http
mx.rpc.http.mxml
mx.rpc.livecycle
mx.rpc.mxml
mx.rpc.remoting
mx.rpc.remoting.mxml
mx.rpc.soap
mx.rpc.soap.mxml
mx.rpc.wsdl
mx.rpc.xml
mx.skins
mx.skins.halo
mx.skins.spark
mx.skins.wireframe
mx.skins.wireframe.windowChrome
mx.states
mx.styles
mx.utils
mx.validators
org.osmf.containers
org.osmf.display
org.osmf.elements
org.osmf.events
org.osmf.layout
org.osmf.logging
org.osmf.media
org.osmf.metadata
org.osmf.net
org.osmf.net.dvr
org.osmf.net.httpstreaming
org.osmf.net.metrics
org.osmf.net.qos
org.osmf.net.rtmpstreaming
org.osmf.net.rules
org.osmf.traits
org.osmf.utils
spark.accessibility
spark.automation.delegates
spark.automation.delegates.components
spark.automation.delegates.components.gridClasses
spark.automation.delegates.components.mediaClasses
spark.automation.delegates.components.supportClasses
spark.automation.delegates.skins.spark
spark.automation.events
spark.collections
spark.components
spark.components.calendarClasses
spark.components.gridClasses
spark.components.mediaClasses
spark.components.supportClasses
spark.components.windowClasses
spark.core
spark.effects
spark.effects.animation
spark.effects.easing
spark.effects.interpolation
spark.effects.supportClasses
spark.events
spark.filters
spark.formatters
spark.formatters.supportClasses
spark.globalization
spark.globalization.supportClasses
spark.layouts
spark.layouts.supportClasses
spark.managers
spark.modules
spark.preloaders
spark.primitives
spark.primitives.supportClasses
spark.skins
spark.skins.mobile
spark.skins.mobile.supportClasses
spark.skins.spark
spark.skins.spark.mediaClasses.fullScreen
spark.skins.spark.mediaClasses.normal
spark.skins.spark.windowChrome
spark.skins.wireframe
spark.skins.wireframe.mediaClasses
spark.skins.wireframe.mediaClasses.fullScreen
spark.transitions
spark.utils
spark.validators
spark.validators.supportClasses
xd.core.axm.enterprise.view.components
xd.core.axm.enterprise.view.skins
xd.core.axm.view.components
xd.core.axm.view.components.support

語言元素

全域常數
全域函數
運算子
陳述式、關鍵字和指令
特殊類型

附錄

新增內容
編譯器錯誤
編譯器警告
執行階段錯誤
移轉至 ActionScript 3
支援的字元集
僅限 MXML 標籤
移動 XML 元素
Timed Text 標籤
不建議元素清單
AccessibilityImplementation 常數
如何使用 ActionScript 範例
法律聲明
套件mx.core
介面public interface IUITextField extends IIMESupport , IFlexModule , IInvalidating , ISimpleStyleClient , IToolTipManagerClient , IUIComponent , IFlexDisplayObject , IFlexDisplayObject , IBitmapDrawable , IEventDispatcher
實作者 UIFTETextField, UITextField

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

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



公用屬性
 屬性定義自
 InheritedaccessibilityProperties : AccessibilityProperties
此顯示物件的目前輔助功能選項。
IFlexDisplayObject
 Inheritedalpha : Number
指出所指定物件的 Alpha 透明度值。
IFlexDisplayObject
  alwaysShowSelection : Boolean
當設定為 true 而且文字欄位不在焦點中時,Flash Player 便會將文字欄位中的選取範圍反白標示為灰色。
IUITextField
  antiAliasType : String
對此文字欄位使用的消除鋸齒類型。
IUITextField
  autoSize : String
控制文字欄位的自動調整大小和對齊方式。
IUITextField
  background : Boolean
會指定文字欄位是否具有背景填色。
IUITextField
  backgroundColor : uint
文字欄位背景的顏色。
IUITextField
 InheritedbaselinePosition : Number
[唯讀] The y-coordinate of the baseline of the first line of text of the component.
IUIComponent
 InheritedblendMode : String
來自 BlendMode 類別的值,會指定要使用何種混合模式。
IFlexDisplayObject
  border : Boolean
會指定文字欄位是否具有邊框。
IUITextField
  borderColor : uint
文字欄位邊框的顏色。
IUITextField
  bottomScrollV : int
[唯讀] 整數 (從 1 開始的索引),指出目前在指定之文字欄位中,可以看見的最底端字行。
IUITextField
 InheritedcacheAsBitmap : Boolean
如果設定為 true,Flash 執行階段會快取顯示物件的內部點陣圖表示法。
IFlexDisplayObject
  caretIndex : int
[唯讀] 插入點 (跳脫字元) 位置的索引。
IUITextField
  condenseWhite : Boolean
Boolean 值,指定在具有 HTML 文字的文字欄位中,是否移除額外的空白字元 (空格、斷行符號等等)。
IUITextField
  defaultTextFormat : flash.text:TextFormat
指定套用至新插入之文字 (例如,使用者所輸入的文字,或是以 replaceSelectedText() 方法插入的文字) 的格式。
IUITextField
  displayAsPassword : Boolean
指定文字欄位是否為密碼文字欄位。
IUITextField
 Inheriteddocument : Object
A reference to the document object associated with this component.
IUIComponent
  doubleClickEnabled : Boolean
會指定物件是否會收到 doubleClick 事件。
IUITextField
  embedFonts : Boolean
會指定是否要使用內嵌的字體外框顯示。
IUITextField
 Inheritedenabled : Boolean
Whether the component can accept user interaction.
IUIComponent
 InheritedenableIME : Boolean
[唯讀] Specifies whether the IME should be enabled when this component has focus.
IIMESupport
 InheritedexplicitHeight : Number
The explicitly specified height for the component, in pixels, as the component's coordinates.
IUIComponent
 InheritedexplicitMaxHeight : Number
[唯讀] Number that specifies the maximum height of the component, in pixels, as the component's coordinates.
IUIComponent
 InheritedexplicitMaxWidth : Number
[唯讀] Number that specifies the maximum width of the component, in pixels, as the component's coordinates.
IUIComponent
 InheritedexplicitMinHeight : Number
[唯讀] Number that specifies the minimum height of the component, in pixels, as the component's coordinates.
IUIComponent
 InheritedexplicitMinWidth : Number
[唯讀] 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
索引的陣列,其中包含目前和顯示物件相關的每個濾鏡物件。
IFlexDisplayObject
 InheritedfocusPane : Sprite
A single Sprite object that is shared among components and used as an overlay for drawing the focus indicator.
IUIComponent
  focusRect : Object
會指定這個物件是否會顯示焦點矩形。
IUITextField
  gridFitType : String
對此文字欄位使用的格線符合類型。
IUITextField
 Inheritedheight : Number
會指出顯示物件的高度,以像素為單位。
IFlexDisplayObject
  htmlText : String
包含 HTML 表示方式的文字欄位內容。
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
[唯讀] 文字欄位中的字元數。
IUITextField
 InheritedloaderInfo : LoaderInfo
[唯讀] 會傳回 LoaderInfo 物件,其中包含關於載入此顯示物件所屬之檔案的資訊。
IFlexDisplayObject
 Inheritedmask : DisplayObject
呼叫之顯示物件會以指定的 mask 物件遮蓋。
IFlexDisplayObject
  maxChars : int
文字欄位可以包含的最大字元數,也就是使用者可輸入的字元數。
IUITextField
 InheritedmaxHeight : Number
[唯讀] Number that specifies the maximum height of the component, in pixels, as the component's coordinates.
IUIComponent
  maxScrollH : int
[唯讀] scrollH 的最大值。
IUITextField
  maxScrollV : int
[唯讀] scrollV 的最大值。
IUITextField
 InheritedmaxWidth : Number
[唯讀] Number that specifies the maximum width of the component, in pixels, as the component's coordinates.
IUIComponent
 InheritedmeasuredHeight : Number
[唯讀] 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
[唯讀] The measured width of this object.
IFlexDisplayObject
 InheritedminHeight : Number
[唯讀] Number that specifies the minimum height of the component, in pixels, as the component's coordinates.
IUIComponent
 InheritedminWidth : Number
[唯讀] Number that specifies the minimum width of the component, in pixels, as the component's coordinates.
IUIComponent
  mouseEnabled : Boolean
指定此物件是否接收滑鼠或其他使用者輸入及訊息。
IUITextField
  mouseWheelEnabled : Boolean
Boolean 值,指出當使用者按一下文字欄位並滾動滑鼠滾輪時,Flash Player 是否會自動捲動多行文字欄位。
IUITextField
 InheritedmouseX : Number
[唯讀] 指出滑鼠或使用者輸入裝置位置的 x 座標,以像素為單位。
IFlexDisplayObject
 InheritedmouseY : Number
[唯讀] 指出滑鼠或使用者輸入裝置位置的 y 座標,以像素為單位。
IFlexDisplayObject
  multiline : Boolean
指出欄位是否為多行文字欄位。
IUITextField
 Inheritedname : String
指出 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
[唯讀] Unlike textHeight, this returns a non-zero value even when the text is empty.
IUITextField
  numLines : int
[唯讀] 會定義多行文字欄位中的文字行數。
IUITextField
 InheritedopaqueBackground : Object
會指定顯示物件是否不透明,並具有特定背景顏色。
IFlexDisplayObject
 Inheritedowner : DisplayObjectContainer
The owner of this IVisualElement object.
IUIComponent
 Inheritedparent : DisplayObjectContainer
[唯讀] 指出包含此顯示物件的 DisplayObjectContainer 物件。
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
指出使用者能夠輸入文字欄位中的字元組。
IUITextField
 Inheritedroot : DisplayObject
[唯讀] 對載入之 SWF 檔案的顯示物件而言,root 屬性就是該 SWF 檔案所呈現之顯示清單樹狀結構部分的最上層顯示物件。
IFlexDisplayObject
 Inheritedrotation : Number
指出 DisplayObject 實體的旋轉度數 (從該物件原本方向算起)。
IFlexDisplayObject
 Inheritedscale9Grid : Rectangle
目前產生效用的縮放格線。
IFlexDisplayObject
 InheritedscaleX : Number
指出從註冊點套用的物件水平縮放 (百分比)。
IFlexDisplayObject
 InheritedscaleY : Number
指出從物件註冊點套用的物件垂直縮放 (百分比)。
IFlexDisplayObject
  scrollH : int
目前的水平捲動位置。
IUITextField
 InheritedscrollRect : Rectangle
顯示物件的捲動矩形範圍。
IFlexDisplayObject
  scrollV : int
文字欄位中文字的垂直位置。
IUITextField
  selectable : Boolean
指出文字欄位是否可選取的 Boolean 值。
IUITextField
  selectionBeginIndex : int
[唯讀] 目前選取範圍中,第一個字元的字元索引值 (從零開始)。
IUITextField
  selectionEndIndex : int
[唯讀] 目前選取範圍中,最後一個字元的字元索引值 (從零開始)。
IUITextField
  sharpness : Number
在這個文字欄位中,文字邊緣的清晰度。
IUITextField
 Inheritedstage : Stage
[唯讀] 顯示物件的「舞台」。
IFlexDisplayObject
 InheritedstyleName : Object
The source of this object's style values.
ISimpleStyleClient
  styleSheet : StyleSheet
將樣式表附加至文字欄位。
IUITextField
 InheritedsystemManager : ISystemManager
A reference to the SystemManager object for this component.
IUIComponent
  tabEnabled : Boolean
會指定這個物件是否在停駐點順序中。
IUITextField
  tabIndex : int
會指定 SWF 檔中的物件停駐點順序。
IUITextField
  text : String
做為文字欄位中目前文字的字串。
IUITextField
  textColor : uint
文字欄位中文字的顏色,以十六進位格式表示。
IUITextField
  textHeight : Number
[唯讀] 文字的高度,以像素為單位。
IUITextField
  textWidth : Number
[唯讀] 文字的寬度,以像素為單位。
IUITextField
  thickness : Number
在這個文字欄位中,字符邊緣的粗細。
IUITextField
 InheritedtoolTip : String
The text of this component's tooltip.
IToolTipManagerClient
 Inheritedtransform : flash.geom:Transform
這是一個物件,具有和顯示物件的矩陣、顏色轉換和像素邊界有關的屬性。
IFlexDisplayObject
 InheritedtweeningProperties : Array
Used by EffectManager.
IUIComponent
  type : String
文字欄位的類型。
IUITextField
  useRichTextClipboard : Boolean
會指定文字格式是否隨著文字一起複製和貼上。
IUITextField
 Inheritedvisible : Boolean
不管是否看得見顯示物件。
IFlexDisplayObject
 Inheritedwidth : Number
會指出顯示物件的寬度,以像素為單位。
IFlexDisplayObject
  wordWrap : Boolean
指出文字欄位是否具有文字換行功能的 Boolean 值。
IUITextField
 Inheritedx : Number
指出 DisplayObject 實體相對於父輩 DisplayObjectContainer 之區域座標的 x 座標。
IFlexDisplayObject
 Inheritedy : Number
指出 DisplayObject 實體相對於父輩 DisplayObjectContainer 之區域座標的 y 座標。
IFlexDisplayObject
公用方法
 方法定義自
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。
IEventDispatcher
  
會將 newText 參數所指定的字串附加到文字欄位之文字的尾端。
IUITextField
 Inherited
會將事件傳送到事件流程。
IEventDispatcher
 Inherited
getBounds(targetCoordinateSpace:DisplayObject):Rectangle
傳回可定義顯示物件區域 (相對於 targetCoordinateSpace 物件的座標系統) 的矩形。
IFlexDisplayObject
  
會傳回做為字元之範圍框的矩形。
IUITextField
  
會在 x 和 y 參數所指定的點,傳回字元的索引值 (從零開始)。
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
  
指定字元索引,會傳回相同段落中第一個字元的索引。
IUITextField
  
對於使用 <img> 標籤新增至 HTML 格式之文字欄位的影像或 SWF 檔,傳回指定之 id 的 DisplayObject 參考。
IUITextField
  
會在 x 和 y 參數所指定的點,傳回字行的索引值 (從零開始)。
IUITextField
  
會傳回字行的索引值 (從零開始),該字行包含 charIndex 參數所指定的字元。
IUITextField
  
getLineLength(lineIndex:int):int
會傳回特定文字行中的字元數。
IUITextField
  
會傳回關於指定之文字行的公制字資訊。
IUITextField
  
getLineOffset(lineIndex:int):int
會傳回 lineIndex 參數所指定之字行中,第一個字元的字元索引。
IUITextField
  
會傳回 lineIndex 參數所指定之字行的文字。
IUITextField
  
指定字元索引,會傳回包含指定之字元的段落長度。
IUITextField
 Inherited
getRect(targetCoordinateSpace:DisplayObject):Rectangle
根據 targetCoordinateSpace 參數所定義的座標系統,並排除形狀上的任何筆畫,傳回可定義顯示物件邊界的矩形。
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):flash.text:TextFormat
會傳回 TextFormat 物件,包含 beginIndex 和 endIndex 參數所指定之文字範圍的格式資訊。
IUITextField
  
Returns a UITextFormat object that contains formatting information for this component.
IUITextField
 Inherited
將 point 物件從「舞台」(全域) 座標轉換成顯示物件的 (區域) 座標。
IFlexDisplayObject
 Inherited
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。
IEventDispatcher
 Inherited
評估顯示物件的範圍框,看它是否與 obj 顯示物件的範圍框重疊或相交。
IFlexDisplayObject
 Inherited
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
評估顯示物件,看它是否與 x 和 y 參數所指定的點重疊或相交。
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
將 point 物件從顯示物件的 (區域) 座標轉換成「舞台」(全域) 座標。
IFlexDisplayObject
 Inherited
Moves this object to the specified x and y coordinates.
IFlexDisplayObject
 Inherited
owns(displayObject:DisplayObject):Boolean
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
會從 EventDispatcher 物件移除偵聽程式。
IEventDispatcher
  
會以 value 參數的內容取代目前的選取範圍。
IUITextField
  
replaceText(beginIndex:int, endIndex:int, newText:String):void
會以 newText 參數的內容,取代 beginIndex 和 endIndex 參數所指定的字元範圍。
IUITextField
 Inherited
setActualSize(newWidth:Number, newHeight:Number):void
Sets the actual size of this object.
IFlexDisplayObject
  
Sets the font color of the text.
IUITextField
  
Sets the focus to this component.
IUITextField
  
setSelection(beginIndex:int, endIndex:int):void
根據第一個和最後一個字元指定的索引值 (以 beginIndex 和 endIndex 參數指定),設定選取文字。
IUITextField
  
setTextFormat(format:flash.text:TextFormat, beginIndex:int = -1, endIndex:int = -1):void
會將 format 參數所指定的文字格式,套用至文字欄位中的指定文字。
IUITextField
 Inherited
setVisible(value:Boolean, noEvent:Boolean = false):void
Called when the visible property changes.
IUIComponent
 Inherited
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
檢查此 EventDispatcher 物件是否已註冊事件偵聽程式,或者此物件的任何祖系已為特定事件類型註冊事件偵聽程式。
IEventDispatcher
屬性詳細資訊

alwaysShowSelection

屬性
alwaysShowSelection:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

當設定為 true 而且文字欄位不在焦點中時,Flash Player 便會將文字欄位中的選取範圍反白標示為灰色。 當設定為 false 而且文字欄位不在焦點中時,Flash Player 便不會反白標示文字欄位中的選取範圍。



實作
    public function get alwaysShowSelection():Boolean
    public function set alwaysShowSelection(value:Boolean):void

antiAliasType

屬性 
antiAliasType:String

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

對此文字欄位使用的消除鋸齒類型。 請針對此屬性使用 flash.text.AntiAliasType 常數。 只有在字體是嵌入時 (embedFonts 屬性設定為 true) 才能控制這個設定。 預設值是 flash.text.AntiAliasType.NORMAL

若要設定此屬性,請使用下列字串值:

字串值說明
flash.text.AntiAliasType.NORMAL套用一般文字消除鋸齒。 此值符合 Flash Player 7 和舊版所使用的消除鋸齒類型。
flash.text.AntiAliasType.ADVANCED套用進階消除鋸齒,讓文字更易於辨識。(這項功能從 Flash Player 8 開始提供)。 進階消除鋸齒可呈現超高品質的小字體外觀。 特別適合用於含有大量小型文字的應用程式。大於 48 點的字體則不建議使用進階消除鋸齒。



實作
    public function get antiAliasType():String
    public function set antiAliasType(value:String):void

autoSize

屬性 
autoSize:String

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

控制文字欄位的自動調整大小和對齊方式。 TextFieldAutoSize 常數的可接受值:TextFieldAutoSize.NONE (預設值),TextFieldAutoSize.LEFTTextFieldAutoSize.RIGHTTextFieldAutoSize.CENTER

如果 autoSize 設定為 TextFieldAutoSize.NONE (預設值),就不會調整大小。

如果 autoSize 設定為 TextFieldAutoSize.LEFT,就會將文字視為靠左對齊的文字,這表示文字欄位的左方邊界會維持固定,而且文字欄位的單一字行若有任何調整大小的行為,都會發生在右方邊界。 如果文字包含斷行符號 (例如,"\n""\r"),也會調整底部的大小,以配合下一行文字。 如果 wordWrap 也設定為 true,則只有文字欄位底部才會調整大小,右方邊界則維持不變。

如果 autoSize 設定為 TextFieldAutoSize.RIGHT,就會將文字視為靠右對齊的文字,這表示文字欄位的右方邊界會維持固定,而且文字欄位的單一字行若有任何調整大小的行為,都會發生在左方邊界。 如果文字包含斷行符號 (例如,"\n" 或 "\r"),也會調整底部的大小,以配合下一行文字。 如果 wordWrap 也設定為 true,則只有文字欄位底部才會調整大小,左方邊界則維持不變。

如果 autoSize 設定為 TextFieldAutoSize.CENTER,則文字會被視為置中對齊的文字,表示文字欄位的單一字行若有任何調整大小的行為,都會平均分配到左右方的邊界。 如果文字包含斷行符號 (例如,"\n""\r"),也會調整底部的大小,以配合下一行文字。 如果 wordWrap 也設定為 true,則只有文字欄位底部才會調整大小,左右方邊界則維持不變。



實作
    public function get autoSize():String
    public function set autoSize(value:String):void

background

屬性 
background:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會指定文字欄位是否具有背景填色。 如果為 true,文字欄位就會有背景填色; 如果 false,則文字欄位不會有背景填色。 請使用 backgroundColor 屬性設定文字欄位的背景顏色。



實作
    public function get background():Boolean
    public function set background(value:Boolean):void

backgroundColor

屬性 
backgroundColor:uint

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

文字欄位背景的顏色。 預設值為 0xFFFFFF (白色)。 即使目前沒有背景,您依然可以擷取或設定這個屬性,不過只有在文字欄位的 background 屬性設定為 true 時,才能看見這個顏色。



實作
    public function get backgroundColor():uint
    public function set backgroundColor(value:uint):void

border

屬性 
border:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會指定文字欄位是否具有邊框。 如果是 true,文字欄位便具有邊框; 如果是 false,文字欄位則沒有邊框。 請使用 borderColor 屬性設定邊框顏色。



實作
    public function get border():Boolean
    public function set border(value:Boolean):void

borderColor

屬性 
borderColor:uint

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

文字欄位邊框的顏色。 預設值為 0x000000 (黑色)。 即使目前沒有邊框,您依然可以擷取或設定這個屬性,不過只有在文字欄位的 border 屬性設定為 true 時,才能看見這個顏色。



實作
    public function get borderColor():uint
    public function set borderColor(value:uint):void

bottomScrollV

屬性 
bottomScrollV:int  [唯讀]

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

整數 (從 1 開始的索引),指出目前在指定之文字欄位中,可以看見的最底端字行。 將文字欄位視為文字區塊上的視窗。 scrollV 屬性是視窗中,最頂端之可見字行的索引 (從 1 開始)。

在文字欄位中,scrollVbottomScrollV 字行間的所有文字目前都是可見的。



實作
    public function get bottomScrollV():int

caretIndex

屬性 
caretIndex:int  [唯讀]

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

插入點 (跳脫字元) 位置的索引。 如果沒有顯示插入點,其值就是您將焦點還原至欄位時的插入點位置 (通常會是插入點的最後位置,不曾有過焦點時則會是 0)。

合併選取範圍索引從零開始記算 (例如,第一個位置是 0,第二個位置是 1,依此類推)。



實作
    public function get caretIndex():int

condenseWhite

屬性 
condenseWhite:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Boolean 值,指定在具有 HTML 文字的文字欄位中,是否移除額外的空白字元 (空格、斷行符號等等)。預設值為 falsecondenseWhite 屬性只會影響以 htmlText 屬性 (而非 text 屬性) 設定的文字。 如果您以 text 屬性設定文字,便會忽略 condenseWhite

如果 condenseWhite 是設定為 true,請使用標準 HTML 命令 (如 <BR><P>),將斷行符號放置在文字欄位中。

設定 htmlText 屬性之前,請先設定 condenseWhite 屬性。



實作
    public function get condenseWhite():Boolean
    public function set condenseWhite(value:Boolean):void

defaultTextFormat

屬性 
defaultTextFormat:flash.text:TextFormat

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

指定套用至新插入之文字 (例如,使用者所輸入的文字,或是以 replaceSelectedText() 方法插入的文字) 的格式。

注意:選取要用 setSelection()replaceSelectedText() 取代的字元時,唯有已達到且包含所選取的文字最後的字元時,才會套用 defaultTextFormat。底下是一個範例:

     var my_txt:TextField new TextField();
     my_txt.text = "Flash Macintosh version";
     var my_fmt:TextFormat = new TextFormat();
     my_fmt.color = 0xFF0000;
     my_txt.defaultTextFormat = my_fmt;
     my_txt.setSelection(6,15); // partial text selected - defaultTextFormat not applied
     my_txt.setSelection(6,23); // text selected to end - defaultTextFormat applied
     my_txt.replaceSelectedText("Windows version");
     

當您存取 defaultTextFormat 屬性時,傳回的 TextFormat 物件會定義所有屬性。 沒有屬性是 null

注意: 如果已經將樣式表套用至文字欄位,就不能設定這個屬性。



實作
    public function get defaultTextFormat():flash.text:TextFormat
    public function set defaultTextFormat(value:flash.text:TextFormat):void

displayAsPassword

屬性 
displayAsPassword:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

指定文字欄位是否為密碼文字欄位。 如果此屬性的值是 true,就會將文字欄位視為密碼文字欄位,並會使用星號隱藏輸入字元,而不會顯示實際字元。 如果是 false,就不會將文字欄位視為密碼文字欄位。 啟用密碼模式時,「剪下」與「複製」命令及其對應的鍵盤快速鍵都不會具有作用。 這個安全性機制可預防惡意使用者利用捷徑來找出無人看管的電腦上之密碼。



實作
    public function get displayAsPassword():Boolean
    public function set displayAsPassword(value:Boolean):void

doubleClickEnabled

屬性 
doubleClickEnabled:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

指定物件是否接收 doubleClick 事件。 預設值為 false,也就是說,InteractiveObject 依預設無法接收 doubleClick 事件。 如果將 doubleClickEnabled 屬性設為 true,則實體會接收到其範圍內的 doubleClick 事件。 InteractiveObject 實體的 mouseEnabled 屬性必須同時設為 true,這樣物件才能接收 doubleClick 事件。

設定這個屬性不會傳送任何事件。 您必須使用 addEventListener() 方法來加入 doubleClick 事件所需的事件偵聽程式。



實作
    public function get doubleClickEnabled():Boolean
    public function set doubleClickEnabled(value:Boolean):void

embedFonts

屬性 
embedFonts:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會指定是否要使用內嵌的字體外框顯示。 如果為 false,Flash Player 會使用裝置字體顯示文字欄位。

如果您將文字欄位的 embedFonts 屬性設定為 true,就必須使用套用至文字欄位的 TextFormat 物件之 font 屬性,指定該文字的字體。 如果指定的字體沒有嵌入 SWF 檔,文字就不會顯示。



實作
    public function get embedFonts():Boolean
    public function set embedFonts(value:Boolean):void

focusRect

屬性 
focusRect:Object

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會指定這個物件是否會顯示焦點矩形。 它可以接受下列三個值中的其中一個:truefalsenulltruefalse 值會如預期方式運作,指定是否顯示焦點矩形。null 值表示此物件會遵循舞台的 stageFocusRect 屬性。



實作
    public function get focusRect():Object
    public function set focusRect(value:Object):void

gridFitType

屬性 
gridFitType:String

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

對此文字欄位使用的格線符合類型。 只有在文字欄位的 flash.text.AntiAliasType 屬性設定為 flash.text.AntiAliasType.ADVANCED 時,才會套用這個屬性。

格線符合的類型,用於決定 Flash Player 是否會強制強的水平和垂直線,以符合像素或子像素格線,或是不符合任何格線。

針對 flash.text.GridFitType 屬性,您可以使用下列字串值:

字串值說明
flash.text.GridFitType.NONE指定不使用格線符合。 不強制文字內的水平和垂直線與像素格線符合。 建議針對動畫或大型字體使用這個設定。
flash.text.GridFitType.PIXEL指定強的水平和垂直線都會與像素格線符合。 此設定只能用在靠左對齊的文字欄位。 若要使用這個設定,文字欄位的 flash.dispaly.AntiAliasType 屬性必須設定為 flash.text.AntiAliasType.ADVANCED。 一般而言,此設定能為靠左對齊的文字提供最佳易讀性。
flash.text.GridFitType.SUBPIXEL指定強的水平和垂直線與 LCD 顯示器上的子像素格線符合 若要使用這個設定,文字欄位的 flash.text.AntiAliasType 屬性必須設定為 flash.text.AntiAliasType.ADVANCEDflash.text.GridFitType.SUBPIXEL 設定通常適用於靠右對齊或置中的動態文字,有時也是用來平衡動畫和文字品質的有用設定。



實作
    public function get gridFitType():String
    public function set gridFitType(value:String):void

htmlText

屬性 
htmlText:String

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

包含 HTML 表示方式的文字欄位內容。

Flash Player 支援下列 HTML 標籤:

標籤 說明
錨點標籤 <a> 標籤會建立超連結,並支援下列特質:
  • target:指定載入頁面所在的目標視窗名稱。 選項包括 _self_blank_parent_top_self 選項會指定目前視窗中的目前頁框、_blank 會指定新的視窗、_parent 會指定目前頁框的父輩,而 _top 則會指定目前視窗中最上層的頁框。
  • href:指定 URL 或 ActionScript link 事件。URL 可以是絕對位置,或是相對於載入頁面之 SWF 檔的位置。 URL 之絕對參照的範例為 http://www.adobe.com;相對參照的範例則為 /index.html。 絕對 URL 必須以 http:// 開頭,否則 Flash Player 或 AIR 會視為相對 URL。您可以使用 link 事件,讓連結執行 SWF 檔中的 ActionScript 函數,而不是開啟 URL。 若要指定 link 事件,請使用事件結構,而不是您的 href 特質中的 http 結構。 例如使用 href="event:myText",而不是 href="http://myURL"。當使用者按一下包含事件配置的超文字連結時,文字欄位會傳送其 text 屬性設定為 "myText" 的 link TextEvent。 接著,您可以建立於傳送 link TextEvent 時執行的 ActionScript 函數。 您也可以使用樣式表,定義錨點標籤的 a:linka:hovera:active 樣式。
粗體標籤 <b> 標籤會使文字呈現粗體。 所使用的字體必須具有粗體字樣。
斷行標籤 <br> 標籤會在文字欄位中建立斷行, 將文字欄位設為多行文字欄位,以使用這個標籤。
字體標籤 <font> 標籤會指定字體或字體清單以顯示文字。字體標籤支援下列特質:
  • color:僅支援十六進位顏色 (#FFFFFF) 值。
  • face:指定要使用的字體名稱。 如下列範例所示,您可以指定一份以逗點分隔字體名稱的清單,在此情況下,Flash Player 會選取第一種可用的字體: 如果指定的字體並未安裝在本機電腦系統上,或是未內嵌在 SWF 檔中,Flash Player 便會選取替代的字體。
  • size:指定字體大小。 您可以使用絕對像素大小,如 16 或 18;或是相對點大小,如 +2 或 -4。
影像標籤 <img> 標籤可讓您將外部影像檔 (JPEG、GIF、PNG)、SWF 檔及影片片段嵌入文字欄位中。 文字會自動排列在文字欄位中所嵌入影像的四周。 您必須將文字欄位設定為多行,才能將文字圍繞影像。

<img> 標籤支援下列特質:

  • src:指定影像檔、SWF 檔或元件庫中影片片段元件之連結識別名稱的 URL。 這個特質是必要的;其他所有特質都是選用的。 外部檔案 (JPEG、GIF、PNG 和 SWF 檔) 必須等到下載完成之後才會顯示。
  • width:所插入之影像、SWF 檔案或影片片段的寬度 (以像素為單位)。
  • height:所插入之影像、SWF 檔或影片片段的高度 (以像素為單位)。
  • align:指定文字欄位內所嵌入影像的水平對齊方式。 有效值為 leftright。 預設值為 left
  • hspace:指定環繞在影像周圍而不會顯示文字的水平空間量。 預設值為 8。
  • vspace:指定環繞在影像周圍而不會顯示文字的垂直空間量。 預設值為 8。
  • id:指定含有內嵌影像檔、SWF 檔或影片片段之影片片段實體 (由 Flash Player 建立) 的名稱。 這讓您得以使用 ActionScript 控制內嵌內容。
  • checkPolicyFile:指定 Flash Player 檢查伺服器 (與影像的網域有關聯) 上的 URL 原則檔。如果原則檔存在,檔案中所列出網域內的 SWF 檔即可存取載入影像的資料,例如呼叫 BitmapData.draw() 方法,並以此影像做為 source 參數。如需安全性詳細資訊,請參閱「Flash Player 開發人員中心」主題:安全性

Flash 會以完整大小來顯示文字欄位中所嵌入的媒體。 若要指定內嵌的媒體尺寸,請使用 <img> 標籤的 heightwidth 特質。

一般而言,嵌入在文字欄位中的影像,會顯示在 <img> 標籤之後的下一行中。 然而,如果 <img> 標籤是文字欄位中的第一個字元,影像便會出現在文字欄位的第一行上。

對於應用程式安全執行程序中的 AIR 內容,AIR 會忽略 ActionScript TextField 物件中 HTML 內容的 img 標籤。這可避免遭受潛在的網路釣魚攻擊。

斜體標籤 <i> 標籤會將加上標籤的文字以斜體顯示。 所使用的字體必須具有斜體字樣。
清單項目標籤 <li> 標籤會在標籤內的文字之前加上項目符號。 注意:由於 Flash Player 與 AIR 無法辨識編號清單和項目清單標籤 (<ol><ul>),這些標籤不會修改清單的顯示方式。所有的清單都沒有順序,而且所有的清單項目都會使用項目符號。
段落標籤 <p> 標籤會建立新的段落。 文字欄位必須設為多行文字欄位,才能使用這個標籤。<p> 標籤支援下列特質:
  • align:指定段落內文字的對齊方式;有效值為 leftrightjustifycenter
  • class:指定由 flash.text.StyleSheet 物件定義的 CSS 樣式類別。
Span 標籤 <span> 標籤只能用於 CSS 文字樣式 它支援以下特質:
  • class:指定由 flash.text.StyleSheet 物件定義的 CSS 樣式類別。
文字格式標籤

<textformat> 標籤可讓您在文字欄位內使用 TextFormat 類別的段落格式屬性之子集,包括行距、縮排、邊界及定位停駐點。 您可以將 <textformat> 標籤與內建的 HTML 標籤組合使用。

<textformat> 標籤具有下列特質:

  • blockindent:以點為單位指定區塊縮排;對應於 TextFormat.blockIndent
  • indent:指定段落中從左方邊界到第一個字元的縮排,對應於 TextFormat.indent。 正值與負值均可接受。
  • leading:指定行與行之間的距離 (垂直間距),對應於 TextFormat.leading。 正值與負值均可接受。
  • leftmargin:以點為單位指定段落的左邊界;對應於 TextFormat.leftMargin
  • rightmargin:以點為單位指定段落的右邊界,對應於 TextFormat.rightMargin
  • tabstops:指定自訂定位停駐點為非負值整數的陣列,對應於 TextFormat.tabStops
底線標籤 <u> 標籤會為標籤內的文字加上底線。

Flash Player 和 AIR 支援下列 HTML 實體:

實體 說明
&lt; < (小於)
&gt; > (大於)
&amp; & (&符號)
&quot; " (雙引號)
&apos; ' (所有格、單引號)

Flash Player 和 AIR 也明確支援字元碼,如 &#38; (ASCII 的 & 符號) 及 &#x20AC; (Unicode 的 € 符號)。



實作
    public function get htmlText():String
    public function set htmlText(value:String):void

ignorePadding

屬性 
ignorePadding:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

If true, the paddingLeft and paddingRight styles will not add space around the text of the component.



實作
    public function get ignorePadding():Boolean
    public function set ignorePadding(value:Boolean):void

inheritingStyles

屬性 
inheritingStyles:Object

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

The beginning of this UITextField's chain of inheriting styles. The getStyle() method accesses inheritingStyles[styleName] to search the entire prototype-linked chain. This object is set up by the initProtoChain() method. You typically never need to access this property directly.



實作
    public function get inheritingStyles():Object
    public function set inheritingStyles(value:Object):void

length

屬性 
length:int  [唯讀]

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

文字欄位中的字元數。 像是定位點字元 (\t) 這類字元也算是一個字元。



實作
    public function get length():int

maxChars

屬性 
maxChars:int

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

文字欄位可以包含的最大字元數,也就是使用者可輸入的字元數。 程式碼可以插入比 maxChars 允許還多的文字;maxChars 屬性僅會指出使用者可輸入多少文字。 如果此屬性的值是 0,使用者即可輸入無限數量的文字。



實作
    public function get maxChars():int
    public function set maxChars(value:int):void

maxScrollH

屬性 
maxScrollH:int  [唯讀]

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

scrollH 的最大值。



實作
    public function get maxScrollH():int

maxScrollV

屬性 
maxScrollV:int  [唯讀]

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

scrollV 的最大值。



實作
    public function get maxScrollV():int

mouseEnabled

屬性 
mouseEnabled:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

指定此物件是否接收滑鼠或其他使用者輸入及訊息。預設值為 true,也就是說,任何位於顯示清單上的 InteractiveObject 實體,依預設都會接收滑鼠事件或其他使用者輸入事件。如果 mouseEnabled 設定成 false,則此實體不會接收任何滑鼠事件 (或其他使用者輸入事件,例如鍵盤事件)。在顯示清單上,此實體的任何子系都不會受到影響。 若要變更顯示清單上某個物件的所有子系之 mouseEnabled 行為指令,請使用 flash.display.DisplayObjectContainer.mouseChildren

設定這個屬性不會傳送任何事件。 您必須使用 addEventListener() 方法來建立互動式功能。



實作
    public function get mouseEnabled():Boolean
    public function set mouseEnabled(value:Boolean):void

mouseWheelEnabled

屬性 
mouseWheelEnabled:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Boolean 值,指出當使用者按一下文字欄位並滾動滑鼠滾輪時,Flash Player 是否會自動捲動多行文字欄位。根據預設,這個值為 true。 如果想要防止滑鼠滾輪捲動文字欄位,或實作您自己的文字欄位捲動,這個屬性就會很有用。



實作
    public function get mouseWheelEnabled():Boolean
    public function set mouseWheelEnabled(value:Boolean):void

multiline

屬性 
multiline:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

指出欄位是否為多行文字欄位。如果其值是 true,文字欄位就是多行;如果是 false,則表示文字欄位是單行文字欄位。在 TextFieldType.INPUT 類型的欄位中,multiline 值會決定 Enter 鍵是否會建立新行 (如果為 false 值,則會忽略 Enter 鍵)。如果您將文字貼至 multiline 值為 falseTextField,則會從文字中去除新行字元。



實作
    public function get multiline():Boolean
    public function set multiline(value:Boolean):void

nestLevel

屬性 
nestLevel:int

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Depth of this object in the containment hierarchy. This number is used by the measurement and layout code. The value is 0 if this component is not on the DisplayList.



實作
    public function get nestLevel():int
    public function set nestLevel(value:int):void

nonInheritingStyles

屬性 
nonInheritingStyles:Object

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

The beginning of this UITextField's chain of non-inheriting styles. The getStyle() method accesses nonInheritingStyles[styleName] method to search the entire prototype-linked chain. This object is set up by the initProtoChain() method. You typically never need to access this property directly.



實作
    public function get nonInheritingStyles():Object
    public function set nonInheritingStyles(value:Object):void

nonZeroTextHeight

屬性 
nonZeroTextHeight:Number  [唯讀]

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Unlike textHeight, this returns a non-zero value even when the text is empty. In this case, it returns what the textHeight would be if the text weren't empty.



實作
    public function get nonZeroTextHeight():Number

numLines

屬性 
numLines:int  [唯讀]

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會定義多行文字欄位中的文字行數。 如果 wordWrap 屬性設定為 true,行數便會在文字換行時增加。



實作
    public function get numLines():int

restrict

屬性 
restrict:String

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

指出使用者能夠輸入文字欄位中的字元組。 如果 restrict 屬性的值是 null,您就可以輸入任何字元。 如果 restrict 屬性的值是空字串,您就不能輸入任何字元。 如果 restrict 屬性的值是字元組成的字串,您只能在文字欄位內輸入此字串中的字元。 會由左向右掃描這個字串。 您可以使用連字符號 (-) 字元指定範圍。 只會限制使用者互動;Script 可以將任何文字放入文字欄位中。這個屬性不會與「屬性」檢測器中的「嵌入字體」選項同步化。

如果字串以跳脫字元 (^) 開始,在初始時便會接受所有的字元,字串中的後續字元則會排除在接受的字元組之外。 如果該字串不是以跳脫字元 (^) 開始,在初始時便不會接受任何字元,並且字串中的後續字元都會包含在接受的字元組內。

下列範例只允許在文字欄位中輸入大寫字元、空格和數字:

     my_txt.restrict = "A-Z 0-9";
     

下列範例包含所有字元,但排除小寫字母:

     my_txt.restrict = "^a-z";
     

您可以使用反斜線來逐字輸入 ^ 或 -。 接受的反斜線序列為 \-、\^ 或 \\。 反斜線必須是字串中的實際字元,因此當您在 ActionScript 中指定它時,就必須使用雙反斜線。 例如,以下的程式碼只包含破折號 (-) 和跳脫字元 (^):

     my_txt.restrict = "\\-\\^";
     

^ 可以在字串中的任何一處使用,用以切換包含的字元及排除的字元。下列程式碼只包含大寫字母,但排除大寫字母 Q:

     my_txt.restrict = "A-Z^Q";
     

您可以使用 \u 跳脫序列來建構 restrict 字串。下列程式碼只包含從 ASCII 32 (空格) 到 ASCII 126 ("~" 符號) 的字元。

     my_txt.restrict = "\u0020-\u007E";
     



實作
    public function get restrict():String
    public function set restrict(value:String):void

scrollH

屬性 
scrollH:int

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

目前的水平捲動位置。 如果 scrollH 屬性是 0,文字便不會水平捲動。 這個屬性值是代表水平位置 (以像素為單位) 的整數。

水平捲動的單位是像素,垂直捲動的單位則是字行。 水平捲動是以像素為單位來測量,因為一般使用的字體多數都依比例調整間距。也就是說,字元可以有不同的寬度。 由於使用者通常希望看到的是完整的字行,而非部分的字行,所以 Flash Player 會逐行執行垂直捲動。 即使一個字行使用多種字體,該字行的高度也會調整以配合使用的最大字體。

注意: scrollH 屬性是從 0 開始,不像 scrollV 垂直捲動屬性是從 1 開始。



實作
    public function get scrollH():int
    public function set scrollH(value:int):void

scrollV

屬性 
scrollV:int

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

文字欄位中文字的垂直位置。 scrollV 屬性有助於在長篇中將使用者引導至特定的段落,或是建立捲動的文字欄位。

垂直捲動的單位是字行,水平捲動的單位則是像素。 如果顯示的第一個字行是文字欄位中的第一個字行,scrollV 便會設定為 1 (而非 0)。 水平捲動是以像素為單位來測量,因為多數字體都是依比例調整間距。也就是說,字元可以有不同的寬度。 由於使用者通常希望看到的是完整的字行,而非部分的字行,所以 Flash 會逐行執行垂直捲動。 即使一行文字上有多種字體,行的高度也會調整成符合所使用的最大字體。



實作
    public function get scrollV():int
    public function set scrollV(value:int):void

selectable

屬性 
selectable:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

指出文字欄位是否可選取的 Boolean 值。 true 值表示文字是可選取的。 selectable 屬性會控制是否可選取 (而非編輯) 文字欄位。 動態的文字欄位就算不能編輯一樣可以選取。 如果無法選取動態文字欄位,使用者便無法選取其文字。

如果 selectable 設定為 false,文字欄位中的文字就不會回應滑鼠或鍵盤上的選取命令,而且也無法以「複製」命令複製文字。 如果 selectable 設定為 true,即可以滑鼠或鍵盤選取文字欄位中的文字,並且能以「複製」命令複製文字。 就算文字欄位是動態文字欄位而不是輸入文字欄位,您仍然可以依這種方式選取文字。



實作
    public function get selectable():Boolean
    public function set selectable(value:Boolean):void

selectionBeginIndex

屬性 
selectionBeginIndex:int  [唯讀]

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

目前選取範圍中,第一個字元的字元索引值 (從零開始)。 例如,第一個字元是 0,第二個字元是 1,依此類推。 如果沒有選取文字,此屬性便會是 caretIndex 的值。



實作
    public function get selectionBeginIndex():int

selectionEndIndex

屬性 
selectionEndIndex:int  [唯讀]

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

目前選取範圍中,最後一個字元的字元索引值 (從零開始)。 例如,第一個字元是 0,第二個字元是 1,依此類推。 如果沒有選取文字,此屬性便會是 caretIndex 的值。



實作
    public function get selectionEndIndex():int

sharpness

屬性 
sharpness:Number

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

在這個文字欄位中,文字邊緣的清晰度。只有在文字欄位的 flash.text.AntiAliasType 屬性設定為 flash.text.AntiAliasType.ADVANCED 時,才會套用這個屬性。 sharpness 的範圍是從 -400 到 400 之間的數字。 如果嘗試將 sharpness 設定為範圍外的值,Flash 會將屬性設定為離範圍內最近的值 (不是 -400 就是 400)。



實作
    public function get sharpness():Number
    public function set sharpness(value:Number):void

styleSheet

屬性 
styleSheet:StyleSheet

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

將樣式表附加至文字欄位。 如需建立樣式表的資訊,請參閱 StyleSheet 類別和「ActionScript 3.0 開發人員指南」。

您隨時都能變更與文字欄位有關聯的樣式表。 如果您變更使用中的樣式表,便會以新的樣式表重繪文字欄位。 您可以將樣式表設定為 nullundefined 以移除樣式表。 使用的樣式表若被移除,文字欄位會在沒有樣式表的情況下重新繪製。

注意:如果移除樣式表,TextField.textTextField.htmlText 的內容都會變更,以便將該樣式表先前套用的格式納入。 若要保留不含格式的原始 TextField.htmlText 內容,請先將該值儲存在變數中,再移除樣式表。



實作
    public function get styleSheet():StyleSheet
    public function set styleSheet(value:StyleSheet):void

tabEnabled

屬性 
tabEnabled:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會指定這個物件是否在停駐點順序中。 如果此物件在定位停駐點順序中,則其數值為 true,否則為 false。 根據預設,除了下列情況以外,這個值都為 false

  • 對於 SimpleButton 物件,這個值為 true
  • 對於具有 type = "input" 的 TextField 物件,這個值為 true
  • 對於 Sprite 物件或具有 buttonMode = true 的 MovieClip 物件,這個值為 true



實作
    public function get tabEnabled():Boolean
    public function set tabEnabled(value:Boolean):void

tabIndex

屬性 
tabIndex:int

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會指定 SWF 檔中的物件停駐點順序。 tabIndex 屬性預設為 -1,也就是說該物件沒有設定任何定位停駐點索引。

如果目前該 SWF 檔所顯示的任何物件含有 tabIndex 屬性,自動定位停駐點順序便會停用,而定位停駐點的順序會從物件在 SWF 檔中的 tabIndex 屬性開始計算。 自訂定位停駐點順序只會包含具有 tabIndex 屬性的物件。

tabIndex 屬性可以是非負值的整數。 物件是根據它們的 tabIndex 屬性,依遞增順序排列。 tabIndex 值為 1 的物件會排在 tabIndex 值為 2 的物件前面。 請勿對多個物件使用相同的 tabIndex 值。

tabIndex 屬性所定義的自訂定位停駐點順序是「平面」。 也就是說,SWF 檔中物件的階層架構關係是被忽略的。 該 SWF 檔中具有 tabIndex 屬性的所有物件都是依照定位停駐點順序放置的;這個定位停駐點順序是由 tabIndex 值的順序來決定。

注意:若要為 TLFTextField 實體設定停駐點順序,請將 TLFTextField 的顯示物件子系轉換為 InteractiveObject,然後設定 tabIndex 屬性。例如:

	 InteractiveObject(tlfInstance.getChildAt(1)).tabIndex = 3;
	 
若要從 TLFTextField 物件之三個實體的預設值反轉停駐點順序 (tlfInstance1tlfInstance2tlfInstance3),請使用:
	 InteractiveObject(tlfInstance1.getChildAt(1)).tabIndex = 3;
	 InteractiveObject(tlfInstance2.getChildAt(1)).tabIndex = 2;
	 InteractiveObject(tlfInstance3.getChildAt(1)).tabIndex = 1;
	 



實作
    public function get tabIndex():int
    public function set tabIndex(value:int):void

text

屬性 
text:String

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

做為文字欄位中目前文字的字串。 字行是由歸位字元 ('\r',ASCII 13) 加以區隔。 這個屬性包含文字欄位中不含 HTML 標籤的未格式化文字。

若要取得 HTML 格式的文字,請使用 htmlText 屬性。

注意:如果樣式表套用到文字欄位,text 屬性的內容將會解譯為 HTML。



實作
    public function get text():String
    public function set text(value:String):void

textColor

屬性 
textColor:uint

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

文字欄位中文字的顏色,以十六進位格式表示。 16 進位顏色系統使用六位數來代表顏色值。 每位數字都具有 16 種可能的值或字元。字元的範圍從 0 到 9,並從 A 到 F。例如,黑色是 0x000000;白色是 0xFFFFFF



實作
    public function get textColor():uint
    public function set textColor(value:uint):void

textHeight

屬性 
textHeight:Number  [唯讀]

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

文字的高度,以像素為單位。



實作
    public function get textHeight():Number

textWidth

屬性 
textWidth:Number  [唯讀]

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

文字的寬度,以像素為單位。



實作
    public function get textWidth():Number

thickness

屬性 
thickness:Number

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

在這個文字欄位中,字符邊緣的粗細。 只有在 flash.text.AntiAliasType 設定為 flash.text.AntiAliasType.ADVANCED 才會套用這個屬性。

thickness 的範圍是從 -200 到 200 之間的數字。 如果嘗試將thickness 設定為範圍外的值,Flash 會將屬性設定為離範圍內最近的值 (不是 -200 就是 200)。



實作
    public function get thickness():Number
    public function set thickness(value:Number):void

type

屬性 
type:String

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

文字欄位的類型。 可以是下列其中一個 TextFieldType 常數:TextFieldType.DYNAMIC,會指定使用者無法編輯的動態文字欄位;或是 TextFieldType.INPUT,會指定使用者可以編輯的輸入文字欄位。



實作
    public function get type():String
    public function set type(value:String):void

useRichTextClipboard

屬性 
useRichTextClipboard:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會指定文字格式是否隨著文字一起複製和貼上。 如果設定為 true,則當您在文字欄位之間複製和貼上文字時,Flash Player 也會複製和貼上格式 (如對齊方式、粗體及斜體)。複製和貼上程序中的原始與目標文字欄位,都必須將 useRichTextClipboard 設定為 true。 預設值是 false



實作
    public function get useRichTextClipboard():Boolean
    public function set useRichTextClipboard(value:Boolean):void

wordWrap

屬性 
wordWrap:Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

指出文字欄位是否具有文字換行功能的 Boolean 值。 如果 wordWrap 的值是 true,文字欄位便有文字換行;如果這個值是 false,文字欄位就沒有文字換行。 預設值是 false



實作
    public function get wordWrap():Boolean
    public function set wordWrap(value:Boolean):void
方法詳細資訊

appendText

()方法
public function appendText(newText:String):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會將 newText 參數所指定的字串附加到文字欄位之文字的尾端。 這個方法比使用加法指定 (+= ) text 屬性 (如 someTextField.text += moreText) 的方式更有效率,特別適用於含有大量內容的文字欄位。

參數

newText:String — The string to append to the existing text.

getCharBoundaries

()方法 
public function getCharBoundaries(charIndex:int):Rectangle

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會傳回做為字元之範圍框的矩形。

參數

charIndex:int — The zero-based index value for the character (for example, the first position is 0, the second position is 1, and so on).

傳回值
Rectangle — A rectangle with x and y minimum and maximum values defining the bounding box of the character.

getCharIndexAtPoint

()方法 
public function getCharIndexAtPoint(x:Number, y:Number):int

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會在 xy 參數所指定的點,傳回字元的索引值 (從零開始)。

參數

x:Number — The x coordinate of the character.
 
y:Number — The y coordinate of the character.

傳回值
int — 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.

getFirstCharInParagraph

()方法 
public function getFirstCharInParagraph(charIndex:int):int

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

指定字元索引,會傳回相同段落中第一個字元的索引。

參數

charIndex:int — The zero-based index value of the character (for example, the first character is 0, the second character is 1, and so on).

傳回值
int — The zero-based index value of the first character in the same paragraph.

getImageReference

()方法 
public function getImageReference(id:String):DisplayObject

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

對於使用 <img> 標籤新增至 HTML 格式之文字欄位的影像或 SWF 檔,傳回指定之 id 的 DisplayObject 參考。 <img> 標籤的格式如下:

   <img src = 'filename.jpg' id = 'instanceName' >

參數

id:String — The id to match (in the id attribute of the <img> tag).

傳回值
DisplayObject — The display object corresponding to the image or SWF file with the matching id attribute in the <img> 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 <img> tag with the matching id exists, the method returns null.

getLineIndexAtPoint

()方法 
public function getLineIndexAtPoint(x:Number, y:Number):int

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會在 xy 參數所指定的點,傳回字行的索引值 (從零開始)。

參數

x:Number — The x coordinate of the line.
 
y:Number — The y coordinate of the line.

傳回值
int — 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.

getLineIndexOfChar

()方法 
public function getLineIndexOfChar(charIndex:int):int

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會傳回字行的索引值 (從零開始),該字行包含 charIndex 參數所指定的字元。

參數

charIndex:int — The zero-based index value of the character (for example, the first character is 0, the second character is 1, and so on).

傳回值
int — The zero-based index value of the line.

getLineLength

()方法 
public function getLineLength(lineIndex:int):int

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會傳回特定文字行中的字元數。

參數

lineIndex:int — The line number for which you want the length.

傳回值
int — The number of characters in the line.

getLineMetrics

()方法 
public function getLineMetrics(lineIndex:int):flash.text:TextLineMetrics

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會傳回關於指定之文字行的公制字資訊。

參數

lineIndex:int — The line number for which you want metrics information.

傳回值
flash.text:TextLineMetrics — A TextLineMetrics object.

getLineOffset

()方法 
public function getLineOffset(lineIndex:int):int

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會傳回 lineIndex 參數所指定之字行中,第一個字元的字元索引。

參數

lineIndex:int — The zero-based index value of the line (for example, the first line is 0, the second line is 1, and so on).

傳回值
int — The zero-based index value of the first character in the line.

getLineText

()方法 
public function getLineText(lineIndex:int):String

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會傳回 lineIndex 參數所指定之字行的文字。

參數

lineIndex:int — The zero-based index value of the line (for example, the first line is 0, the second line is 1, and so on).

傳回值
String — The text string contained in the specified line.

getParagraphLength

()方法 
public function getParagraphLength(charIndex:int):int

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

指定字元索引,會傳回包含指定之字元的段落長度。 這個長度是相對於段落中的第一個字元 (與 getFirstCharInParagraph() 傳回的相同) 而言,而非傳入的字元索引。

參數

charIndex:int — The zero-based index value of the character (for example, the first character is 0, the second character is 1, and so on).

傳回值
int — Returns the number of characters in the paragraph.

getStyle

()方法 
public function getStyle(styleProp:String):*

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Gets a style property that has been set anywhere in this component's style lookup chain.

This same method is used to get any kind of style property, so the value returned can be a Boolean, String, Number, int, uint (for an RGB color), Class (for a skin), or any kind of object. Therefore the return type is simply specified as *.

If you are getting a particular style property, you know its type and often want to store the result in a variable of that type. No casting from * to that type is necessary.

var backgroundColor:uint = getStyle("backgroundColor");

If the style property has not been set anywhere in the style lookup chain, the value returned by getStyle() is undefined. Note that undefined is a special value that is not the same as false, "", NaN, 0, or null. No valid style value is ever undefined. You can use the method IStyleManager2.isValidStyleValue() to test whether the value was set.

參數

styleProp:String — Name of the style property.

傳回值
* — Style value.

getTextFormat

()方法 
public function getTextFormat(beginIndex:int = -1, endIndex:int = -1):flash.text:TextFormat

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會傳回 TextFormat 物件,包含 beginIndexendIndex 參數所指定之文字範圍的格式資訊。 唯有對指定之所有文字都通用的屬性,才會在產生的 TextFormat 物件中加以設定。 任何「混合」的屬性,都表示在文字的不同位置會具有不同的值,因此都具有 null 的值。

如果您沒有指定這些參數的值,這個方法便會套用至文字欄位中的所有文字。

下表說明三個可能的用法:

用法說明
my_textField.getTextFormat()傳回 TextFormat 物件,包含文字欄位中所有文字的格式資訊。 只有文字欄位中所有文字通用的屬性才會於產生的 TextFormat 物件中設定。 任何「混合」的屬性,都表示在文字的不同位置會具有不同的值,因此都具有 null 的值。
my_textField.getTextFormat(beginIndex:Number)會傳回 TextFormat 物件,包含在 beginIndex 位置之字元的文字格式副本。
my_textField.getTextFormat(beginIndex:Number,endIndex:Number)傳回 TextFormat 物件,它包含了從 beginIndexendIndex-1 的文字範圍格式資訊。 只有指定範圍裡所有文字通用的屬性才會於產生的 TextFormat 物件中設定。 任何混合的屬性 (在範圍的不同位置具有不同的值) 都會將值設為 null

參數

beginIndex:int (default = -1) — Optional; an integer that specifies the starting location of a range of text within the text field.
 
endIndex:int (default = -1) — 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.

傳回值
flash.text:TextFormat — The TextFormat object that represents the formatting properties for the specified text.

getUITextFormat

()方法 
public function getUITextFormat():mx.core:UITextFormat

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Returns a UITextFormat object that contains formatting information for this component. This method is similar to the getTextFormat() method of the flash.text.TextField class, but it returns a UITextFormat object instead of a TextFormat object.

The UITextFormat class extends the TextFormat class to add the text measurement methods measureText() and measureHTMLText().

傳回值
mx.core:UITextFormat — An object that contains formatting information for this component.

replaceSelectedText

()方法 
public function replaceSelectedText(value:String):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

value 參數的內容取代目前的選取範圍。 文字會插入到目前選取範圍的位置,它會使用目前的預設字元格式和預設段落格式。 並且不會被視為 HTML。

您可以使用 replaceSelectedText() 方法插入並刪除文字,而不中斷文字中其它部分的字元及段落格式。

注意:如果將樣式表套用至文字欄位,這個方法就無法使用。

參數

value:String — The string to replace the currently selected text.

replaceText

()方法 
public function replaceText(beginIndex:int, endIndex:int, newText:String):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

beginIndexendIndex 參數所指定的字元範圍,以 newText 參數的內容取代。 依原設計,這會取代從 beginIndexendIndex-1 的文字。

注意:如果將樣式表套用至文字欄位,這個方法就無法使用。

參數

beginIndex:int — The zero-based index value for the start position of the replacement range.
 
endIndex:int — The zero-based index position of the first character after the desired text span.
 
newText:String — The text to use to replace the specified range of characters.

setColor

()方法 
public function setColor(color:uint):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Sets the font color of the text.

參數

color:uint — The new font color.

setFocus

()方法 
public function setFocus():void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Sets the focus to this component. The component can in turn pass focus to a subcomponent.

Note: Only the TextInput and TextArea controls show a highlight when this method sets the focus. All controls show a highlight when the user tabs to the control.

setSelection

()方法 
public function setSelection(beginIndex:int, endIndex:int):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會根據第一個和最後一個字元指定的索引值 (以 beginIndexendIndex 參數指定),設定選取文字。 如果這兩個參數值相同,這個方法便會設定插入點,就像是設定 caretIndex 屬性一樣。

參數

beginIndex:int — 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).
 
endIndex:int — The zero-based index value of the last character in the selection.

setTextFormat

()方法 
public function setTextFormat(format:flash.text:TextFormat, beginIndex:int = -1, endIndex:int = -1):void

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

會將 format 參數所指定的文字格式套用至文字欄位中的指定文字。 format 的值必須是會指定所需文字格式變更的 TextFormat 物件。 只有 format 的非 null 屬性才會套用至該文字欄位, 設定為 null 的任何 format 屬性則都不會套用。 根據預設,所有新建立的 TextFormat 物件屬性都會設為 null

注意:如果將樣式表套用至文字欄位,這個方法就無法使用。

setTextFormat() 方法會變更套用至字元範圍或文字欄位中,全部文字的文字格式。 若要將格式的屬性套用至文字欄位中的所有文字,請勿指定 beginIndexendIndex 的值。 若要將格式的屬性套用至文字範圍,請指定 beginIndexendIndex 參數值。 您可以使用 length 屬性來判斷索引值。

在 TextFormat 物件中有兩種格式資訊類型,字元等級格式和段落等級格式。 文字欄位中的每個字元都具有其字元格式設定,如字體名稱、字體大小、粗體以及斜體。

對段落而言,段落的第一個字元會當做整段的段落格式設定而進行檢查。 段落格式設定的範例有左方邊界、右方邊界與縮排。

由使用者手動插入、或是由 replaceSelectedText() 方法所取代的任何文字,都會接收新文字的文字欄位預設格式,而非針對文字插入點指定的格式。若要設定新文字的預設格式,請使用 defaultTextFormat

參數

format:flash.text:TextFormat — A TextFormat object that contains character and paragraph formatting information.
 
beginIndex:int (default = -1) — Optional; an integer that specifies the zero-based index position specifying the first character of the desired range of text.
 
endIndex:int (default = -1) — 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.

UsageDescription
my_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.

truncateToFit

()方法 
public function truncateToFit(truncationIndicator:String = null):Boolean

語言版本: ActionScript 3.0
產品版本: Flex 3
執行階段版本: Flash Player 9, AIR 1.1

Truncate text to make it fit horizontally in the area defined for the control, and append an ellipsis, three periods (...), to the text.

參數

truncationIndicator:String (default = null) — The text to be appended after truncation. If you pass null, a localizable string such as "..." will be used.

傳回值
Booleantrue if the text needed truncation.




[ X ]為什麼顯示英文?
「ActionScript 3.0 參考」的內容是以英文顯示

並非所有「ActionScript 3.0 參考」的內容都翻譯為所有語言。當語言元素未翻譯時,就會以英文顯示。例如,ga.controls.HelpBox 類別並沒有翻譯為任何語言。因此在參考的繁體中文版本中,ga.controls.HelpBox 類別就會以英文顯示。