ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Hide Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes

Language Reference only
Filters: AIR 32.0 and earlier, Flash Player 32.0 and earlier, Flash Lite 4
Flex 4.6 and earlier, Flash Pro CS6 and earlier
Hide Filters
flashx.textLayout.elements 

TextFlow  - AS3

Packagesx

Top Level
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

Language Elements

Global Constants
Global Functions
Operators
Statements, Keywords & Directives
Special Types

Appendixes

What's New
Compiler Errors
Compiler Warnings
Run-Time Errors
Migrating to ActionScript 3
Supported Character Sets
MXML Only Tags
Motion XML Elements
Timed Text Tags
List of deprecated elements
Accessibility Implementation Constants
How to Use ActionScript Examples
Legal notices
Packageflashx.textLayout.elements
Classpublic class TextFlow
InheritanceTextFlow Inheritance ContainerFormattedElement Inheritance ParagraphFormattedElement Inheritance FlowGroupElement Inheritance FlowElement Inheritance Object
Implements IEventDispatcher

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

The TextFlow class is responsible for managing all the text content of a story. In TextLayout, text is stored in a hierarchical tree of elements. TextFlow is the root object of the element tree. All elements on the tree derive from the base class, FlowElement.

A TextFlow object can have ParagraphElement and DivElement objects as children. A div (DivElement object) represents a group of paragraphs (ParagraphElement objects). A paragraph can have SpanElement, InlineGraphicElement, LinkElement, and TCYElement objects as children.

A span (SpanElement) is a range of text in a paragraph that has the same attributes. An image (InlineGraphicElement) represents an arbitrary graphic that appears as a single character in a line of text. A LinkElement represents a hyperlink, or HTML a tag, and it can contain multiple spans. A TCYElement object is used in Japanese text when there is a small run of text that appears perpendicular to the line, as in a horizontal run within a vertical line. A TCYElement also can contain multiple spans.

TextFlow also derives from the ContainerFormattedElement class, which is the root class for all container-level block elements.

The following illustration shows the relationship of other elements, such as spans and paragraphs, to the TextFlow object.

example TextFlow hierarchy

Each TextFlow object has a corresponding Configuration object that allows you to specify initial character and paragraph formats and the initial container format. It also allows you to specify attributes for selection, links, focus, and scrolling. When you supply a Configuration object as parameter to the TextFlow() constructor, it creates a read-only snapshot that you can access through the TextFlow.configuration property. After creation, you can't change the TextFlow's configuration. If you do not specify a Configuration, you can access the default configuration through the TextFlow.defaultConfiguration property.

Default MXML PropertymxmlChildren

View the examples

More examples

Related API Elements



Public Properties
 PropertyDefined By
 InheritedalignmentBaseline : *
TextLayoutFormat: Specifies the baseline to which the dominant baseline aligns.
FlowElement
 InheritedbackgroundAlpha : *
TextLayoutFormat: Alpha (transparency) value for the background (adopts default value if undefined during cascade).
FlowElement
 InheritedbackgroundColor : *
TextLayoutFormat: Background color of the text (adopts default value if undefined during cascade).
FlowElement
 InheritedbaselineShift : *
TextLayoutFormat: Amount to shift the baseline from the dominantBaseline value.
FlowElement
 InheritedblockProgression : *
TextLayoutFormat: Specifies a vertical or horizontal progression of line placement.
FlowElement
 InheritedbreakOpportunity : *
TextLayoutFormat: Controls where lines are allowed to break when breaking wrapping text into multiple lines.
FlowElement
 InheritedcffHinting : *
TextLayoutFormat: The type of CFF hinting used for this text.
FlowElement
 InheritedclearFloats : *
TextLayoutFormat: Controls how text wraps around a float.
FlowElement
 Inheritedcolor : *
TextLayoutFormat: Color of the text.
FlowElement
 InheritedcolumnCount : *
TextLayoutFormat: Number of text columns (adopts default value if undefined during cascade).
FlowElement
 InheritedcolumnGap : *
TextLayoutFormat: Specifies the amount of gutter space, in pixels, to leave between the columns (adopts default value if undefined during cascade).
FlowElement
 InheritedcolumnWidth : *
TextLayoutFormat: Column width in pixels (adopts default value if undefined during cascade).
FlowElement
 InheritedcomputedFormat : flashx.textLayout.formats:ITextLayoutFormat
[read-only] Returns the computed format attributes that are in effect for this element.
FlowElement
  configuration : IConfiguration
[read-only] The Configuration object for this TextFlow object.
TextFlow
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 InheritedcoreStyles : Object
[read-only] Returns the coreStyles on this FlowElement.
FlowElement
  defaultConfiguration : Configuration
[static] Default configuration for all new TextFlow objects if the configuration is not specified.
TextFlow
 InheriteddigitCase : *
TextLayoutFormat: The type of digit case used for this text.
FlowElement
 InheriteddigitWidth : *
TextLayoutFormat: Type of digit width used for this text.
FlowElement
 Inheriteddirection : *
TextLayoutFormat: Specifies the default bidirectional embedding level of the text in the text block.
FlowElement
 InheriteddominantBaseline : *
TextLayoutFormat: Specifies which element baseline snaps to the alignmentBaseline to determine the vertical position of the element on the line.
FlowElement
 InheritedfirstBaselineOffset : *
TextLayoutFormat: Specifies the baseline position of the first line in the container.
FlowElement
  flowComposer : IFlowComposer
[override] Manages the containers for this element.
TextFlow
 InheritedfontFamily : *
TextLayoutFormat: The name of the font to use, or a comma-separated list of font names.
FlowElement
 InheritedfontLookup : *
TextLayoutFormat: Font lookup to use.
FlowElement
 InheritedfontSize : *
TextLayoutFormat: The size of the text in pixels.
FlowElement
 InheritedfontStyle : *
TextLayoutFormat: Style of text.
FlowElement
 InheritedfontWeight : *
TextLayoutFormat: Weight of text.
FlowElement
 Inheritedformat : flashx.textLayout.formats:ITextLayoutFormat
TextLayoutFormat properties applied directly to this element.
FlowElement
  formatResolver : IFormatResolver
A callback function for resolving element styles.
TextFlow
  generation : uint
[read-only] The generation number for this TextFlow object.
TextFlow
  hostFormat : flashx.textLayout.formats:ITextLayoutFormat
The TextLayoutFormat object for this TextFlow object.
TextFlow
 Inheritedid : String
Assigns an identifying name to the element, making it possible to set a style for the element by referencing the id.
FlowElement
  interactionManager : ISelectionManager
The InteractionManager associated with this TextFlow object.
TextFlow
 InheritedjustificationRule : *
TextLayoutFormat: Rule used to justify text in a paragraph.
FlowElement
 InheritedjustificationStyle : *
TextLayoutFormat: The style used for justification of the paragraph.
FlowElement
 Inheritedkerning : *
TextLayoutFormat: Kerning adjusts the pixels between certain character pairs to improve readability.
FlowElement
 InheritedleadingModel : *
TextLayoutFormat: Specifies the leading model, which is a combination of leading basis and leading direction.
FlowElement
 InheritedligatureLevel : *
TextLayoutFormat: Controls which of the ligatures that are defined in the font may be used in the text.
FlowElement
 InheritedlineBreak : *
TextLayoutFormat: Controls word wrapping within the container (adopts default value if undefined during cascade).
FlowElement
 InheritedlineHeight : *
TextLayoutFormat: Leading controls for the text.
FlowElement
 InheritedlineThrough : *
TextLayoutFormat: If true, applies strikethrough, a line drawn through the middle of the text.
FlowElement
 InheritedlinkActiveFormat : *
TextLayoutFormat: Defines the formatting attributes used for links in normal state.
FlowElement
 InheritedlinkHoverFormat : *
TextLayoutFormat: Defines the formatting attributes used for links in hover state, when the mouse is within the bounds (rolling over) a link.
FlowElement
 InheritedlinkNormalFormat : *
TextLayoutFormat: Defines the formatting attributes used for links in normal state.
FlowElement
 InheritedlistAutoPadding : *
TextLayoutFormat: This specifies an auto indent for the start edge of lists when the padding value of the list on that side is auto.
FlowElement
 InheritedlistMarkerFormat : *
TextLayoutFormat: Defines the formatting attributes list markers.
FlowElement
 InheritedlistStylePosition : *
TextLayoutFormat: Legal values are ListStylePosition.INSIDE, ListStylePosition.OUTSIDE, FormatValue.INHERIT. Default value is undefined indicating not set. If undefined during the cascade this property will inherit its value from an ancestor.
FlowElement
 InheritedlistStyleType : *
TextLayoutFormat: Legal values are ListStyleType.UPPER_ALPHA, ListStyleType.LOWER_ALPHA, ListStyleType.UPPER_ROMAN, ListStyleType.LOWER_ROMAN, ListStyleType.NONE, ListStyleType.DISC, ListStyleType.CIRCLE, ListStyleType.SQUARE, ListStyleType.BOX, ListStyleType.CHECK, ListStyleType.DIAMOND, ListStyleType.HYPHEN, ListStyleType.ARABIC_INDIC, ListStyleType.BENGALI, ListStyleType.DECIMAL, ListStyleType.DECIMAL_LEADING_ZERO, ListStyleType.DEVANAGARI, ListStyleType.GUJARATI, ListStyleType.GURMUKHI, ListStyleType.KANNADA, ListStyleType.PERSIAN, ListStyleType.THAI, ListStyleType.URDU, ListStyleType.CJK_EARTHLY_BRANCH, ListStyleType.CJK_HEAVENLY_STEM, ListStyleType.HANGUL, ListStyleType.HANGUL_CONSTANT, ListStyleType.HIRAGANA, ListStyleType.HIRAGANA_IROHA, ListStyleType.KATAKANA, ListStyleType.KATAKANA_IROHA, ListStyleType.LOWER_ALPHA, ListStyleType.LOWER_GREEK, ListStyleType.LOWER_LATIN, ListStyleType.UPPER_ALPHA, ListStyleType.UPPER_GREEK, ListStyleType.UPPER_LATIN, FormatValue.INHERIT. Default value is undefined indicating not set. If undefined during the cascade this property will inherit its value from an ancestor.
FlowElement
 Inheritedlocale : *
TextLayoutFormat: The locale of the text.
FlowElement
 InheritedmxmlChildren : Array
Appends an array of children to this object.
FlowGroupElement
 InheritednumChildren : int
[read-only] Returns the number of FlowElement children that this FlowGroupElement object has.
FlowGroupElement
 InheritedpaddingBottom : *
TextLayoutFormat: Bottom inset in pixels.
FlowElement
 InheritedpaddingLeft : *
TextLayoutFormat: Left inset in pixels.
FlowElement
 InheritedpaddingRight : *
TextLayoutFormat: Right inset in pixels.
FlowElement
 InheritedpaddingTop : *
TextLayoutFormat: Top inset in pixels.
FlowElement
 InheritedparagraphEndIndent : *
TextLayoutFormat: A Number that specifies, in pixels, the amount to indent the paragraph's end edge.
FlowElement
 InheritedparagraphSpaceAfter : *
TextLayoutFormat: A Number that specifies the amount of space, in pixels, to leave after the paragraph.
FlowElement
 InheritedparagraphSpaceBefore : *
TextLayoutFormat: A Number that specifies the amount of space, in pixels, to leave before the paragraph.
FlowElement
 InheritedparagraphStartIndent : *
TextLayoutFormat: A Number that specifies, in pixels, the amount to indent the paragraph's start edge.
FlowElement
 Inheritedparent : FlowGroupElement
[read-only] Returns the parent of this FlowElement object.
FlowElement
 InheritedparentRelativeEnd : int
[read-only] Returns the relative end of this FlowElement object in the parent.
FlowElement
 InheritedparentRelativeStart : int
[read-only] Returns the relative start of this FlowElement object in the parent.
FlowElement
 InheritedrenderingMode : *
TextLayoutFormat: The rendering mode used for this text.
FlowElement
 InheritedstyleName : *
TextLayoutFormat: Assigns an identifying class to the element, making it possible to set a style for the element by referencing the styleName.
FlowElement
 Inheritedstyles : Object
[read-only] Returns the styles on this FlowElement.
FlowElement
 InheritedtabStops : *
TextLayoutFormat: Specifies the tab stops associated with the paragraph.
FlowElement
 InheritedtextAlign : *
TextLayoutFormat: Alignment of lines in the paragraph relative to the container.
FlowElement
 InheritedtextAlignLast : *
TextLayoutFormat: Alignment of the last (or only) line in the paragraph relative to the container in justified text.
FlowElement
 InheritedtextAlpha : *
TextLayoutFormat: Alpha (transparency) value for the text.
FlowElement
 InheritedtextDecoration : *
TextLayoutFormat: Decoration on text.
FlowElement
 InheritedtextIndent : *
TextLayoutFormat: A Number that specifies, in pixels, the amount to indent the first line of the paragraph.
FlowElement
 InheritedtextJustify : *
TextLayoutFormat: Specifies options for justifying text.
FlowElement
 InheritedtextLength : int
[read-only] Returns the total length of text owned by this FlowElement object and its children.
FlowElement
 InheritedtextRotation : *
TextLayoutFormat: Determines the number of degrees to rotate this text.
FlowElement
 Inheritedtracking : Object
[write-only] Sets the tracking and is synonymous with the trackingRight property.
FlowElement
 InheritedtrackingLeft : *
TextLayoutFormat: Number in pixels (or percent of fontSize, like 120%) indicating the amount of tracking (manual kerning) to be applied to the left of each character.
FlowElement
 InheritedtrackingRight : *
TextLayoutFormat: Number in pixels (or percent of fontSize, like 120%) indicating the amount of tracking (manual kerning) to be applied to the right of each character.
FlowElement
 InheritedtypeName : String
Each FlowElement has a typeName.
FlowElement
 InheritedtypographicCase : *
TextLayoutFormat: The type of typographic case used for this text.
FlowElement
 InheriteduserStyles : Object
Allows you to read and write user styles on a FlowElement object.
FlowElement
 InheritedverticalAlign : *
TextLayoutFormat: Vertical alignment or justification (adopts default value if undefined during cascade).
FlowElement
 InheritedwhiteSpaceCollapse : *
TextLayoutFormat: Collapses or preserves whitespace when importing text into a TextFlow.
FlowElement
 InheritedwordSpacing : *
TextLayoutFormat: Specifies the optimum, minimum, and maximum spacing (as a multiplier of the width of a normal space) between words to use during justification.
FlowElement
Public Methods
 MethodDefined By
  
TextFlow(config:IConfiguration = null)
Constructor - creates a new TextFlow instance.
TextFlow
 Inherited
Appends a child FlowElement object.
FlowGroupElement
 Inherited
Adds a child FlowElement object at the specified index position.
FlowGroupElement
  
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.
TextFlow
 Inherited
Clears the style specified by the styleProp parameter from this FlowElement object.
FlowElement
 Inherited
deepCopy(relativeStart:int = 0, relativeEnd:int = -1):FlowElement
Makes a deep copy of this FlowElement object, including any children, copying the content between the two specified character positions and returning the copy as a FlowElement object.
FlowElement
  
Dispatches an event into the event flow.
TextFlow
 Inherited
Compare the userStyles of this with otherElement's userStyles.
FlowElement
 Inherited
findChildIndexAtPosition(relativePosition:int):int
Given a relative text position, find the index of the first child FlowElement that contains the relative position.
FlowGroupElement
 Inherited
findLeaf(relativePosition:int):FlowLeafElement
Given a relative text position, find the leaf element that contains the position.
FlowGroupElement
 Inherited
Returns the start location of the element in the text flow as an absolute index.
FlowElement
 Inherited
getCharAtPosition(relativePosition:int):String
Returns the character at the specified position, relative to this FlowElement object.
FlowElement
 Inherited
getCharCodeAtPosition(relativePosition:int):int
Returns the character code at the specified position, relative to this FlowElement.
FlowElement
 Inherited
Returns the FlowElement child at the specified index.
FlowGroupElement
 Inherited
Searches in children for the specified FlowElement object and returns its index position.
FlowGroupElement
  
Returns an element whose id property matches the idName parameter.
TextFlow
 Inherited
Returns the start of this element relative to an ancestor element.
FlowElement
  
Returns all elements that have styleName set to styleNameValue.
TextFlow
  
Returns all elements that have typeName set to typeNameValue.
TextFlow
 Inherited
Returns the first FlowLeafElement descendant of this group.
FlowGroupElement
 Inherited
Returns the last FlowLeafElement descendent of this group.
FlowGroupElement
 Inherited
Returns the next FlowElement sibling in the text flow hierarchy.
FlowElement
 Inherited
Returns the ParagraphElement object associated with this element.
FlowElement
 Inherited
Returns the previous FlowElement sibling in the text flow hierarchy.
FlowElement
 Inherited
getStyle(styleProp:String):*
Returns the value of the style specified by the styleProp parameter, which specifies the style name and can include any user style name.
FlowElement
 Inherited
getText(relativeStart:int = 0, relativeEnd:int = -1, paragraphSeparator:String = " "):String
[override]
FlowGroupElement
 Inherited
Climbs the text flow hierarchy to return the root TextFlow object for the element.
FlowElement
  
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
TextFlow
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Called for MXML objects after the implementing object has been created and all component properties specified on the MXML tag have been initialized.
FlowElement
  
Invalidates all formatting information for the TextFlow, forcing it to be recomputed.
TextFlow
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Removes the specified child FlowElement object from the group.
FlowGroupElement
 Inherited
Removes the child FlowElement object at the specified index position.
FlowGroupElement
  
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
TextFlow
 Inherited
replaceChildren(beginChildIndex:int, endChildIndex:int, ... rest):void
Replaces child elements in the group with the specified new elements.
FlowGroupElement
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
setStyle(styleProp:String, newValue:*):void
Sets the style specified by the styleProp parameter to the value specified by the newValue parameter.
FlowElement
 Inherited
shallowCopy(relativeStart:int = 0, relativeEnd:int = -1):FlowElement
Makes a copy of this FlowElement object, copying the content between two specified character positions.
FlowElement
 Inherited
Splits this object at the position specified by the childIndex parameter.
FlowGroupElement
 Inherited
splitAtPosition(relativePosition:int):FlowElement
Splits this FlowElement object at the position specified by the relativePosition parameter, which is a relative position in the text for this element.
FlowElement
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
  
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
TextFlow
Events
 Event Summary Defined By
  Dispatched when any link is clicked.TextFlow
  Dispatched after every recompose.TextFlow
  Dispatched by a TextFlow object each time it is damaged You can use this event to find out that the TextFlow has changed, but do not access the TextFlow itself when this event is sent out.TextFlow
   Defines the value of the type property of a flowOperationBegin event object.TextFlow
   Defines the value of the type property of a flowOperationComplete event object.TextFlow
   Defines the value of the type property of a flowOperationEnd event object.TextFlow
  Dispatched when a InlineGraphicElement is resized due to having width or height as auto or percent and the graphic has finished loading.TextFlow
  Dispatched when the mouse is pressed down over any link.TextFlow
  Dispatched when the mouse passes over any link.TextFlow
  Dispatched when the mouse is released over any link.TextFlow
  Dispatched when the mouse goes out of any link.TextFlow
  Dispatched when the mouse first enters any link.TextFlow
  Dispatched by a TextFlow object after text is scrolled within a controller container.TextFlow
  Dispatched whenever the selection is changed.TextFlow
  Dispatched by a TextFlow object each time a container has had new DisplayObjects added or updated as a result of composition.TextFlow
Property Detail

configuration

property
configuration:IConfiguration  [read-only]

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

The Configuration object for this TextFlow object. The Configuration object specifies the initial character and paragraph formats, the initial container format, and attributes for selection highlighting, links, focus, and scrolling.

If you do not specify a Configuration object, Text Layout Framework uses a default Configuration object, which is referenced by the defaultConfiguration property.



Implementation
    public function get configuration():IConfiguration

Related API Elements

defaultConfiguration

property 
public static var defaultConfiguration:Configuration

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Default configuration for all new TextFlow objects if the configuration is not specified.

Related API Elements

flowComposer

property 
flowComposer:IFlowComposer[override]

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Manages the containers for this element.

The TextLines that are created from the element appear as children of the container. The flowComposer manages the containers, and as the text is edited it adds lines to and removes lines from the containers. The flowComposer also keeps track of some critical attributes, such as the width and height to compose to, whether scrolling is on, and so on.

The container and flowComposer are closely related. If you reset flowComposer, the container is reset to the new flowComposer's container. Likewise if the container is reset, flowComposer is reset to the container's new flowComposer.



Implementation
    override public function get flowComposer():IFlowComposer
    override public function set flowComposer(value:IFlowComposer):void

Related API Elements

formatResolver

property 
formatResolver:IFormatResolver

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

A callback function for resolving element styles. You can use this to provide styling using CSS or named styles, for example.



Implementation
    public function get formatResolver():IFormatResolver
    public function set formatResolver(value:IFormatResolver):void

Related API Elements

generation

property 
generation:uint  [read-only]

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

The generation number for this TextFlow object. The undo and redo operations use the generation number to validate that it's legal to undo or redo an operation. The generation numbers must match.

Each model change increments generation so if the generation number changes, you know the TextFlow model has changed.



Implementation
    public function get generation():uint

hostFormat

property 
hostFormat:flashx.textLayout.formats:ITextLayoutFormat

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

The TextLayoutFormat object for this TextFlow object. This enables several optimizations for reusing host formats. For example;

        textFlowA.hostFormat = textFlowB.hostFormat
        
You must set format values before assigning the TextLayoutFormat object to hostFormat. For example, the following lines do not set the font size to 24 because the font size is set after the TextLayoutFormat object has been assigned to hostFormat.
        format = new TextLayoutFormat()
        textFlow.hostFormat = format
        format.fontSize = 24;
        



Implementation
    public function get hostFormat():flashx.textLayout.formats:ITextLayoutFormat
    public function set hostFormat(value:flashx.textLayout.formats:ITextLayoutFormat):void

Related API Elements

interactionManager

property 
interactionManager:ISelectionManager

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

The InteractionManager associated with this TextFlow object.

Controls all selection and editing on the text. If the TextFlow is not selectable, the interactionManager is null. To make the TextFlow editable, assign a interactionManager that is both an ISelectionManager and an IEditManager. To make a TextFlow that is read-only and allows selection, assign a interactionManager that is an ISelectionManager only.



Implementation
    public function get interactionManager():ISelectionManager
    public function set interactionManager(value:ISelectionManager):void

Related API Elements

Constructor Detail

TextFlow

()Constructor
public function TextFlow(config:IConfiguration = null)

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Constructor - creates a new TextFlow instance.

If you provide a config parameter, the contents of the Configuration object are copied and you cannot make changes. You can access configuration settings, however, through the configuration property. If the config parameter is null, you can access the default configuration settings through the defaultConfiguration property.

The Configuration object provides a mechanism for setting configurable default attributes on a TextFlow. While you can't make changes to the Configuration object, you can override default attributes, if necessary, by setting the attributes of TextFlow and its children.

Parameters
config:IConfiguration (default = null) — Specifies the configuration to use for this TextFlow object. If it's null, use TextFlow.defaultConfiguration to access configuration values.

Related API Elements

Method Detail

addEventListener

()method
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. You can register event listeners on all nodes in the display list for a specific type of event, phase, and priority.

After you successfully register an event listener, you cannot change its priority through additional calls to addEventListener(). To change a listener's priority, you must first call removeEventListener(). Then you can register the listener again with the new priority level.

After the listener is registered, subsequent calls to addEventListener() with a different value for either type or useCapture result in the creation of a separate listener registration. For example, if you first register a listener with useCapture set to true, it listens only during the capture phase. If you call addEventListener() again using the same listener object, but with useCapture set to false, you have two separate listeners: one that listens during the capture phase, and another that listens during the target and bubbling phases.

You cannot register an event listener for only the target phase or the bubbling phase. Those phases are coupled during registration because bubbling applies only to the ancestors of the target node.

When you no longer need an event listener, remove it by calling EventDispatcher.removeEventListener(); otherwise, memory problems might result. Objects with registered event listeners are not automatically removed from memory because the garbage collector does not remove objects that still have references.

Copying an EventDispatcher instance does not copy the event listeners attached to it. (If your newly created node needs an event listener, you must attach the listener after creating the node.) However, if you move an EventDispatcher instance, the event listeners attached to it move along with it.

If the event listener is being registered on a node while an event is also being processed on this node, the event listener is not triggered during the current phase but may be triggered during a later phase in the event flow, such as the bubbling phase.

If an event listener is removed from a node while an event is being processed on the node, it is still triggered by the current actions. After it is removed, the event listener is never invoked again (unless it is registered again for future processing).

Parameters

type:String — The type of event.
 
listener:Function — The listener function that processes the event. This function must accept an event object as its only parameter and must return nothing, as this example shows:

function(evt:Event):void

The function can have any name.
 
useCapture:Boolean (default = false) — Determines whether the listener works in the capture phase or the target and bubbling phases. If useCapture is set to true, the listener processes the event only during the capture phase and not in the target or bubbling phase. If useCapture is false, the listener processes the event only during the target or bubbling phase. To listen for the event in all three phases, call addEventListener() twice, once with useCapture set to true, then again with useCapture set to false.
 
priority:int (default = 0) — The priority level of the event listener. Priorities are designated by a 32-bit integer. The higher the number, the higher the priority. All listeners with priority n are processed before listeners of priority n-1. If two or more listeners share the same priority, they are processed in the order in which they were added. The default priority is 0.
 
useWeakReference:Boolean (default = false) — Determines whether the reference to the listener is strong or weak. A strong reference (the default) prevents your listener from being garbage-collected. A weak reference does not.

Class-level member functions are not subject to garbage collection, so you can set useWeakReference to true for class-level member functions without subjecting them to garbage collection. If you set useWeakReference to true for a listener that is a nested inner function, the function will be garbge-collected and no longer persistent. If you create references to the inner function (save it in another variable) then it is not garbage-collected and stays persistent.

dispatchEvent

()method 
public function dispatchEvent(event:Event):Boolean

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Dispatches an event into the event flow. The event target is the EventDispatcher object upon which dispatchEvent() is called.

Parameters

event:Event — The event object dispatched into the event flow.

Returns
Boolean — A value of true unless preventDefault() is called on the event, in which case it returns false.

getBackgroundManager

()method 
tlf_internal function getBackgroundManager():BackgroundManager

Returns
BackgroundManager

getElementByID

()method 
public function getElementByID(idName:String):FlowElement

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Returns an element whose id property matches the idName parameter. Provides the ability to apply a style based on the id.

For example, the following line sets the style "color" to 0xFF0000 (red), for the element having the id span1.

         textFlow.getElementByID("span1").setStyle("color", 0xFF0000);
         

Note: In the following code, p.addChild(s) removes s from its original parent and adds it to p, the new parent.

         var s:SpanElement = new SpanElement();
         var p:ParagraphElement = new ParagraphElement();
         ...
         s = textFlow.getElementByID("span3") as SpanElement;
         p.addChild(s);
         textFlow.addChild(p);
         

Parameters

idName:String — The id value of the element to find.

Returns
FlowElement — The element whose id matches idName.

Related API Elements


Example  ( How to use this example )

This example imports xml markup into a TextFlow object and calls getElementByID() to access the span with the id span3 and set its color to red.
package flashx.textLayout.elements.examples {
    import flash.display.Sprite;
    
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    
    public class TextFlow_getElementByIDExample extends Sprite
    {
        public function TextFlow_getElementByIDExample()
        {    
            // create the TextFlow object
            var textFlow:TextFlow = new TextFlow();
            
            // xml markup that defines the attributes and contents of a text flow
            var simpleText:String = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
            "<flow:TextFlow xmlns:flow=\"http://ns.adobe.com/textLayout/2008\" verticalScrollPolicy=\"auto\" horizontalScrollPolicy=\"auto\" fontSize=\"14\" textIndent=\"15\" marginBottom=\"15\" paddingTop=\"4\" paddingLeft=\"4\">"+
                "<flow:p>"+
                    "<flow:span id='span1'>In the first paragraph of the </flow:span>"+
                    "<flow:span id='span2' fontStyle=\"italic\">cheap </flow:span>"+
                    "<flow:span id='span3'>Western novel, a cowboy meets a saloon girl.</flow:span>"+
                "</flow:p>"+
            "</flow:TextFlow>";
            var s:SpanElement = new SpanElement();
            var s2:SpanElement = new SpanElement();
            var p:ParagraphElement = new ParagraphElement();
            // import the xml markup into a TextFlow object and display it on the stage
            textFlow = TextConverter.importToFlow(simpleText, TextConverter.TEXT_LAYOUT_FORMAT);
            // get element with ID of span3, make a copy of it
            textFlow.getElementByID("span3").setStyle("color", 0xFF0000); 
            textFlow.flowComposer.addController(new ContainerController(this, 200, 800));
            textFlow.flowComposer.updateAllControllers();
        }
    }
}

            
            

getElementsByStyleName

()method 
public function getElementsByStyleName(styleNameValue:String):Array

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Returns all elements that have styleName set to styleNameValue.

Parameters

styleNameValue:String — The name of the style for which to find elements that have it set.

Returns
Array — An array of the elements whose styleName value matches styleNameValue. For example, all elements that have the style name "color".

Related API Elements

getElementsByTypeName

()method 
public function getElementsByTypeName(typeNameValue:String):Array

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Returns all elements that have typeName set to typeNameValue.

Parameters

typeNameValue:String — The name of the style for which to find elements that have it set.

Returns
Array — An array of the elements whose typeName value matches typeNameValue. For example, all elements that have the type name "foo".

Related API Elements

hasEventListener

()method 
public function hasEventListener(type:String):Boolean

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Checks whether the EventDispatcher object has any listeners registered for a specific type of event. This allows you to determine where an EventDispatcher object has altered handling of an event type in the event flow hierarchy. To determine whether a specific event type will actually trigger an event listener, use IEventDispatcher.willTrigger().

The difference between hasEventListener() and willTrigger() is that hasEventListener() examines only the object to which it belongs, whereas willTrigger() examines the entire event flow for the event specified by the type parameter.

Parameters

type:String — The type of event.

Returns
Boolean — A value of true if a listener of the specified type is registered; false otherwise.

invalidateAllFormats

()method 
public function invalidateAllFormats():void

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Invalidates all formatting information for the TextFlow, forcing it to be recomputed. Call this method when styles have changed.

Related API Elements

removeEventListener

()method 
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Removes a listener from the EventDispatcher object. If there is no matching listener registered with the EventDispatcher object, a call to this method has no effect.

Parameters

type:String — The type of event.
 
listener:Function — The listener object to remove.
 
useCapture:Boolean (default = false) — Specifies whether the listener was registered for the capture phase or the target and bubbling phases. If the listener was registered for both the capture phase and the target and bubbling phases, two calls to removeEventListener() are required to remove both: one call with useCapture set to true, and another call with useCapture set to false.

willTrigger

()method 
public function willTrigger(type:String):Boolean

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. This method returns true if an event listener is triggered during any phase of the event flow when an event of the specified type is dispatched to this EventDispatcher object or any of its descendants.

The difference between hasEventListener() and willTrigger() is that hasEventListener() examines only the object to which it belongs, whereas willTrigger() examines the entire event flow for the event specified by the type parameter.

Parameters

type:String — The type of event.

Returns
Boolean — A value of true if a listener of the specified type will be triggered; false otherwise.
Event Detail

click

Event
Event Object Type: flashx.textLayout.events.FlowElementMouseEvent

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Dispatched when any link is clicked.

compositionComplete

Event  
Event Object Type: flashx.textLayout.events.CompositionCompleteEvent

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Dispatched after every recompose.

damage

Event  
Event Object Type: flashx.textLayout.events.DamageEvent

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Dispatched by a TextFlow object each time it is damaged You can use this event to find out that the TextFlow has changed, but do not access the TextFlow itself when this event is sent out. This event is sent when TextFlow changes are partially complete, so it can be in an inconsistent state: some changes have been mad already, and other changes are still pending. Get the information you need from the event, and make required changes after control returns to your application.

flowOperationBegin

Event  
Event Object Type: flashx.textLayout.events.FlowOperationEvent
property FlowOperationEvent.type = flashx.textLayout.events.FlowOperationEvent.FLOW_OPERATION_BEGIN

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Defines the value of the type property of a flowOperationBegin event object. Dispatched before an operation is executed. Cancelling this event blocks the operation.

flowOperationComplete

Event  
Event Object Type: flashx.textLayout.events.FlowOperationEvent
property FlowOperationEvent.type = flashx.textLayout.events.FlowOperationEvent.FLOW_OPERATION_COMPLETE

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Defines the value of the type property of a flowOperationComplete event object. Dispatched after all operations including pending and composite operations are completed, composition is finished and the display is scrolled.

flowOperationEnd

Event  
Event Object Type: flashx.textLayout.events.FlowOperationEvent
property FlowOperationEvent.type = flashx.textLayout.events.FlowOperationEvent.FLOW_OPERATION_END

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Defines the value of the type property of a flowOperationEnd event object. Dispatched after an operation completes. Any errors are stored in OperationEvent.error. If there is an error, cancelling this event blocks the rethrow of the error. Generally speaking all errors are likely to be fatal.

Changing an operation at this time (after it has been executed) may fail.

inlineGraphicStatusChanged

Event  
Event Object Type: flashx.textLayout.events.StatusChangeEvent

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Dispatched when a InlineGraphicElement is resized due to having width or height as auto or percent and the graphic has finished loading.

mouseDown

Event  
Event Object Type: flashx.textLayout.events.FlowElementMouseEvent

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Dispatched when the mouse is pressed down over any link.

mouseMove

Event  
Event Object Type: flashx.textLayout.events.FlowElementMouseEvent

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Dispatched when the mouse passes over any link.

mouseUp

Event  
Event Object Type: flashx.textLayout.events.FlowElementMouseEvent

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Dispatched when the mouse is released over any link.

rollOut

Event  
Event Object Type: flashx.textLayout.events.FlowElementMouseEvent

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Dispatched when the mouse goes out of any link.

rollOver

Event  
Event Object Type: flashx.textLayout.events.FlowElementMouseEvent

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Dispatched when the mouse first enters any link.

scroll

Event  
Event Object Type: flashx.textLayout.events.TextLayoutEvent

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Dispatched by a TextFlow object after text is scrolled within a controller container.

selectionChange

Event  
Event Object Type: flashx.textLayout.events.SelectionEvent

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Dispatched whenever the selection is changed. Primarily used to update selection-dependent user interface. It can also be used to alter the selection, but cannot be used to alter the TextFlow itself.

updateComplete

Event  
Event Object Type: flashx.textLayout.events.UpdateCompleteEvent

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Dispatched by a TextFlow object each time a container has had new DisplayObjects added or updated as a result of composition.

TextFlowExample.as

This example creates a TextFlow instance with an initial format configuration and adds a ParagraphElement object and a SpanElement object to display Hello World.
package flashx.textLayout.elements.examples {
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.Configuration;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextLayoutFormat;
    import flashx.textLayout.formats.TextAlign;
    import flash.text.engine.FontPosture;
    import flash.text.engine.Kerning;

    public class TextFlowExample extends Sprite
    {
        public function TextFlowExample()
        {
            var config:Configuration = new Configuration();
            var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
            textLayoutFormat.color = 0xFF0000;
            textLayoutFormat.fontFamily = "Arial, Helvetica, _sans";
            textLayoutFormat.fontSize = 48;
            textLayoutFormat.kerning = Kerning.ON;
            textLayoutFormat.fontStyle = FontPosture.ITALIC;
            textLayoutFormat.textAlign = TextAlign.CENTER;
            config.textFlowInitialFormat = textLayoutFormat;
            var textFlow:TextFlow = new TextFlow(config);
            var p:ParagraphElement = new ParagraphElement();
            var span:SpanElement = new SpanElement();
            span.text = "Hello, World!";
            p.addChild(span);
            textFlow.addChild(p);
            textFlow.flowComposer.addController(new ContainerController(this,500,200));
            textFlow.flowComposer.updateAllControllers(); 
        }
    }
}