| 套件 | flashx.textLayout.formats |
| 類別 | public class TextLayoutFormat |
| 繼承 | TextLayoutFormat Object |
| 實作 | ITextLayoutFormat |
| 子類別 | ListMarkerFormat |
| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
format 屬性,讓您可將 TextLayoutFormat 實體指定給這兩項類別。將 TextLayoutFormat 物件指定給容器,以改變所有容器內容的格式。將 TextLayoutFormat 物件指定給 FlowElement 子系,以指定該特定元素的格式:TextFlow、ParagraphElement、DivElement、SpanElement、InlineGraphicElement、LinkElement 以及 TCYElement。除了 format 屬性之外,這些類別也定義每一個個別的 TextLayoutFormat 屬性,所以如有需要,您可以覆寫該元素的特定樣式屬性設定。 因為您可以在多重層級設定指定樣式,這可能會發生衝突。例如,在 TextFlow 層級的文字顏色可能設定為黑色,而 SpanElement 物件卻將它設定為藍色。一般原則是文字流排樹狀結構中最低層級的設定為最優先。因此,如果設定了 TextFlow 實體的連字層級,而且也設定 DivElement 的連字層級,則 DivElement 設定為優先。
重疊顯示樣式是指如果在較低層級中未定義樣式值,則採用文字流排中較高層級樣式的程序。當即將顯示元素中未定義的樣式時,會使用其預設值,或使用從父元素所重疊顯示或繼承的值。例如,如果 SpanElement 物件上文字的透明度 (textAlpha 屬性) 未定義,但 TextFlow 中已設定,則 TexFlow.textAlpha 屬性的值會重疊顯示到 SpanElement 物件,並套用到該範圍的文字。重疊顯示的結果,或是套用至元素的樣式總和,將儲存在元素的 computedFormat 屬性。
您可以利用相同的方式,使用 ContainerController 和 FlowElement 類別的 userStyles 屬性套用使用者樣式。此屬性允許您讀取或寫入使用者樣式字典,並將其設定套用到容器或文字流排元素。使用者樣式字典是由成對 stylename-value 組成的物件。userStyles 屬性指定的樣式具有高於其他屬性的優先權。
大部分未定義的樣式,會在重疊顯示期間繼承其直屬父輩的值。少部分樣式則不會繼承其父值,而是使用自身的預設值。
未定義時採用自身預設值的樣式屬性包括:
backgroundAlpha、backgroundColor、columnCount、columnGap、columnWidth、lineBreak、paddingBottom、paddingLeft、paddingRight、paddingTop 和 verticalAlign
更多範例
相關 API 元素
| 屬性 | 定義自 | ||
|---|---|---|---|
| alignmentBaseline : *
指定主基線對齊的基線。 | TextLayoutFormat | ||
| backgroundAlpha : *
背景的 Alpha (透明度) 值 (如果重疊顯示時未定義,則採用預設值)。 | TextLayoutFormat | ||
| backgroundColor : *
文字的背景色彩 (如果重疊顯示時未定義,則採用預設值)。 | TextLayoutFormat | ||
| baselineShift : *
從 dominantBaseline 值位移基線的量。 | TextLayoutFormat | ||
| blockProgression : *
指定行位置為垂直或水平走向。 | TextLayoutFormat | ||
| breakOpportunity : *
將文字分為多行時,控制換行的位置。 | TextLayoutFormat | ||
| cffHinting : *
用於此文字的 CFF 提示類型。 | TextLayoutFormat | ||
| clearFloats : *
控制文字圍繞浮動圖的方式。 | TextLayoutFormat | ||
| color : *
文字的色彩。 | TextLayoutFormat | ||
| columnCount : *
文字欄的數目 (如果在重疊顯示時未定義,則採用預設值)。 | TextLayoutFormat | ||
| columnGap : *
指定欄與欄之間的間距大小 (以像素為單位),如果重疊顯示時未定義,則採用預設值。 | TextLayoutFormat | ||
| columnWidth : *
以像素為單位的欄寬 (如果重疊顯示時未定義,則採用預設值)。 | TextLayoutFormat | ||
![]() | constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | |
| coreStyles : Object [唯讀] 傳回此 TextLayoutFormat 的 coreStyles。 | TextLayoutFormat | ||
| defaultFormat : flashx.textLayout.formats:ITextLayoutFormat [靜態] [唯讀]
傳回具有預設設定的 TextLayoutFormat 物件。 | TextLayoutFormat | ||
| digitCase : *
用於此文字的數字大小寫類型。 | TextLayoutFormat | ||
| digitWidth : *
用於此文字的數字寬度類型。 | TextLayoutFormat | ||
| direction : *
指定文字區塊內之文字的預設雙向內嵌層級。 | TextLayoutFormat | ||
| dominantBaseline : *
指定貼齊 alignmentBaseline 的元素基線,以決定行上元素的垂直位置。 | TextLayoutFormat | ||
| firstBaselineOffset : *
指定容器中第一行的基線位置。 | TextLayoutFormat | ||
| fontFamily : *
要使用的字體名稱,或是以逗號分隔的字體名稱清單。 | TextLayoutFormat | ||
| fontLookup : *
要使用的字體查詢。 | TextLayoutFormat | ||
| fontSize : *
以像素為單位的文字大小。 | TextLayoutFormat | ||
| fontStyle : *
文字的樣式。 | TextLayoutFormat | ||
| fontWeight : *
文字的粗細。 | TextLayoutFormat | ||
| justificationRule : *
對齊段落中文字所使用的規則。 | TextLayoutFormat | ||
| justificationStyle : *
段落對齊所用的樣式。 | TextLayoutFormat | ||
| kerning : *
字距微調會調整某些字元組之間的像素,以改善可讀性。 | TextLayoutFormat | ||
| leadingModel : *
指定行距模型,它結合了行距基礎及行距方向。 | TextLayoutFormat | ||
| ligatureLevel : *
控制字體中定義的哪些連字可用於文字。 | TextLayoutFormat | ||
| lineBreak : *
控制容器內的文字換行 (如果重疊顯示時未定義,則採用預設值)。 | TextLayoutFormat | ||
| lineHeight : *
文字的行距控制。 | TextLayoutFormat | ||
| lineThrough : *
若為 true,將套用刪除線,亦即通過文字中間的線。 | TextLayoutFormat | ||
| linkActiveFormat : *
定義正常狀態下的連結格式屬性。 | TextLayoutFormat | ||
| linkHoverFormat : *
當滑鼠在連結的邊緣之內 (或上方) 時,定義用於懸浮狀態下的連結格式屬性。 | TextLayoutFormat | ||
| linkNormalFormat : *
定義正常狀態下的連結格式屬性。 | TextLayoutFormat | ||
| listAutoPadding : *
當該邊上的清單邊框距離值為 auto 時,指定清單的開頭邊緣自動縮排。 | TextLayoutFormat | ||
| listMarkerFormat : *
定義格式屬性清單標記。 | TextLayoutFormat | ||
| listStylePosition : *
有效值為 ListStylePosition.INSIDE、ListStylePosition.OUTSIDE、FormatValue.INHERIT。若未定義預設值,則表示未設定。如果重疊顯示時未定義此屬性,則此屬性會繼承祖系的值。 | TextLayoutFormat | ||
| listStyleType : *
有效值為 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。若未定義預設值,則表示未設定。如果重疊顯示時未定義此屬性,則此屬性會繼承祖系的值。 | TextLayoutFormat | ||
| locale : *
文字的地區。 | TextLayoutFormat | ||
| paddingBottom : *
下方內移距 (以像素為單位)。 | TextLayoutFormat | ||
| paddingLeft : *
左方內移距 (以像素為單位)。 | TextLayoutFormat | ||
| paddingRight : *
右方內移距 (以像素為單位)。 | TextLayoutFormat | ||
| paddingTop : *
上方內移距 (以像素為單位)。 | TextLayoutFormat | ||
| paragraphEndIndent : *
指定段落結尾邊緣縮排量的數字 (以像素為單位)。 | TextLayoutFormat | ||
| paragraphSpaceAfter : *
指定段落之後保留的間距大小的數字 (以像素為單位)。 | TextLayoutFormat | ||
| paragraphSpaceBefore : *
指定段落之前保留的間距大小的數字 (以像素為單位)。 | TextLayoutFormat | ||
| paragraphStartIndent : *
指定段落開頭邊緣縮排量的數字 (以像素為單位)。 | TextLayoutFormat | ||
| renderingMode : *
用於此文字的顯示模式。 | TextLayoutFormat | ||
| styleName : *
指定元素的識別類別,如此只要參照此 styleName就可以設定元素的樣式。 | TextLayoutFormat | ||
| styles : Object [唯讀] 傳回此 TextLayoutFormat 的 styles。 | TextLayoutFormat | ||
| tabStops : *
指定段落關聯的定位停駐點。 | TextLayoutFormat | ||
| textAlign : *
段落中各行相對於容器的對齊方式。 | TextLayoutFormat | ||
| textAlignLast : *
段落中最後 (或唯一的) 一行相對於齊行文字中之容器的對齊方式。 | TextLayoutFormat | ||
| textAlpha : *
文字的 Alpha (透明) 值。 | TextLayoutFormat | ||
| textDecoration : *
文字上的裝飾。 | TextLayoutFormat | ||
| textIndent : *
以像素為單位,指定段落中第一行縮排量的數字。 | TextLayoutFormat | ||
| textJustify : *
指定對齊文字的選項。 | TextLayoutFormat | ||
| textRotation : *
決定此文字要旋轉的度數。 | TextLayoutFormat | ||
| trackingLeft : *
以像素為單位代表要套用至每個字元左側字距調整 (手動字距微調) 量的數字 (或 fontSize 的百分比,例如,120%)。 | TextLayoutFormat | ||
| trackingRight : *
以像素為單位代表要套用至每個字元右側字距調整 (手動字距微調) 量的數字 (或 fontSize 的百分比,例如,120%)。 | TextLayoutFormat | ||
| typographicCase : *
用於此文字的印刷大小寫類型。 | TextLayoutFormat | ||
| userStyles : Object [唯讀] 傳回此 TextLayoutFormat 的 userStyles。 | TextLayoutFormat | ||
| verticalAlign : *
垂直對齊或齊行 (如果重疊顯示時未定義,則採用預設值)。 | TextLayoutFormat | ||
| whiteSpaceCollapse : *
將文字匯入 TextFlow 時捨去或保留空格。 | TextLayoutFormat | ||
| wordSpacing : *
指定對齊時要使用之文字間的最佳、最小和最大間距 (標準間距的倍數)。 | TextLayoutFormat | ||
| 方法 | 定義自 | ||
|---|---|---|---|
TextLayoutFormat(initialValues:flashx.textLayout.formats:ITextLayoutFormat = null)
建立新的 TextLayoutFormat 物件。 | TextLayoutFormat | ||
以傳入的 ITextLayoutFormat 實體中設定的屬性值取代此 TextLayoutFormat 物件中的屬性值。 | TextLayoutFormat | ||
以此 TextLayoutFormat 物件的值連接傳入的 ITextLayoutFormat 實體中的屬性值。 | TextLayoutFormat | ||
以此 TextLayoutFormat 物件的值連接傳入的 ITextLayoutFormat 實體中的屬性值。 | TextLayoutFormat | ||
從 ITextLayoutFormat 實體值複製 TextLayoutFormat 設定到此 TextLayoutFormat 物件。 | TextLayoutFormat | ||
[靜態]
建立新的 TextLayoutFormat 物件。 | TextLayoutFormat | ||
傳回由指定樣式名稱之 styleProp 參數所指定的樣式值。 | TextLayoutFormat | ||
![]() |
指出物件是否有已定義的指定屬性。 | Object | |
isEqual(p1:flashx.textLayout.formats:ITextLayoutFormat, p2:flashx.textLayout.formats:ITextLayoutFormat):Boolean [靜態]
比較 ITextLayoutFormat 實體 p1 中的屬性以及 ITextLayoutFormat 實體 p2 中的屬性,如果所有屬性相符,則傳回 true。 | TextLayoutFormat | ||
![]() |
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | |
![]() |
指出指定的屬性是否存在,以及是否可列舉。 | Object | |
如果此 TextLayoutFormat 物件中的屬性與傳入的 ITextLayoutFormat 實體中的屬性不相符,則將此 TextLayoutFormat 物件中的屬性設定為未定義。 | TextLayoutFormat | ||
如果此 TextLayoutFormat 物件中的屬性與傳入的 ITextLayoutFormat 實體中的屬性相符,則將此 TextLayoutFormat 物件中的屬性設定為未定義。 | TextLayoutFormat | ||
![]() |
為迴圈作業設定動態屬性的可用性。 | Object | |
將 styleProp 參數所指定的樣式設為 newValue 參數所指定的值。 | TextLayoutFormat | ||
![]() |
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | |
![]() |
會傳回指定之物件的字串形式。 | Object | |
![]() |
會傳回指定之物件的基本值。 | Object | |
alignmentBaseline | 屬性 |
alignmentBaseline:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
指定主基線對齊的基線。例如,如果設定 dominantBaseline 為 ASCENT,設定 alignmentBaseline 為 DESCENT 會使得文字上方對齊 DESCENT 基線,或在基線之下。通常是由字行中的最大元素決定基線。

有效值是 TextBaseline.ROMAN、TextBaseline.ASCENT、TextBaseline.DESCENT、TextBaseline.IDEOGRAPHIC_TOP、TextBaseline.IDEOGRAPHIC_CENTER、TextBaseline.IDEOGRAPHIC_BOTTOM、TextBaseline.USE_DOMINANT_BASELINE、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 TextBaseline.USE_DOMINANT_BASELINE。
實作
public function get alignmentBaseline():* public function set alignmentBaseline(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
範例 ( 如何使用本範例 )
alignmentBaseline 設為三個不同的值 - USE_DOMINANT_BASELINE、DESCENT 以及 IDEOGRAPHIC_CENTER - 表示在 dominantBaseline 設為 ASCENT 的段落三種範圍。
package flashx.textLayout.formats.examples {
import flash.display.Sprite;
import flash.text.engine.TextBaseline;
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.formats.TextAlign;
public class TextLayoutFormat_alignmentBaselineExample extends Sprite
{
public function TextLayoutFormat_alignmentBaselineExample()
{
// create text flow with dominantBaseline of ASCENT and 3 spans
var textFlow:TextFlow = new TextFlow();
var paragraph:ParagraphElement = new ParagraphElement();
paragraph.fontFamily = "Helvetica";
paragraph.fontSize = 20;
paragraph.dominantBaseline = TextBaseline.ASCENT
var spanOne:SpanElement = new SpanElement();
var spanTwo:SpanElement = new SpanElement();
var spanThree:SpanElement = new SpanElement();
spanOne.text = "Hello, World ";
spanTwo.text = "Hello, World ";
spanThree.text = "Hello, World";
// add spans to paragraph and specify alignment baseline for each
paragraph.addChild(spanOne);
spanOne.alignmentBaseline = TextBaseline.USE_DOMINANT_BASELINE;
paragraph.addChild(spanTwo);
spanTwo.alignmentBaseline = TextBaseline.DESCENT;
paragraph.addChild(spanThree);
spanThree.alignmentBaseline = TextBaseline.IDEOGRAPHIC_CENTER;
// add paragraph to TextFlow and set container position
textFlow.addChild(paragraph);
this.x = 50;
this.y = 100;
// update controller to display on stage
textFlow.flowComposer.addController(new ContainerController(this,400,300));
textFlow.flowComposer.updateAllControllers();
}
}
}
backgroundAlpha | 屬性 |
backgroundAlpha:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
背景的 Alpha (透明度) 值 (如果重疊顯示時未定義,則採用預設值)。值為 0 時表示完全透明,值為 1 時表示完全不透明。alpha 設為 0 的顯示物件都是作用中的狀態,即使看不見它們亦然。
有效值是從 0 到 1 的數字以及 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義,則此屬性的值就會是 1。
實作
public function get backgroundAlpha():* public function set backgroundAlpha(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
backgroundColor | 屬性 |
backgroundColor:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
文字的背景色彩 (如果重疊顯示時未定義,則採用預設值)。可以是常數值 BackgroundColor.TRANSPARENT,或指定 3 個 8 位元 RGB (紅色、綠色、藍色) 值的 16 進位值;例如,0xFF0000 是紅色,而 0x00FF00 是綠色。
有效字串值為 BackgroundColor.TRANSPARENT、FormatValue.INHERIT 以及從 0x0 到 0xffffffff 的單位。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義,則此屬性的值就會是 BackgroundColor.TRANSPARENT。
實作
public function get backgroundColor():* public function set backgroundColor(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
baselineShift | 屬性 |
baselineShift:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
從 dominantBaseline 值位移基線的量。單位為像素,或 fontSize 的百分比 (在此情況下,請輸入字串值,如 140%)。正值會將水平文字上移 (垂直文字則右移),負值則會將水平文字下移 (垂直文字則左移)。
有效值是 BaselineShift.SUPERSCRIPT、BaselineShift.SUBSCRIPT、FormatValue.INHERIT。
有效值是從 -1000 到 1000 之間的數字。
有效值是從 -1000 到 1000 之間數字的百分比。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 0.0。
實作
public function get baselineShift():* public function set baselineShift(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
blockProgression | 屬性 |
blockProgression:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
指定行位置為垂直或水平走向。行由上到下 (BlockProgression.TB,用於水平文字) 排列,或由右向左 (BlockProgression.RL,用於垂直文字) 排列。
有效值是 BlockProgression.RL、BlockProgression.TB、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性會繼承祖系的值。如果沒有祖系設定此屬性,則值將為 BlockProgression.TB。
實作
public function get blockProgression():* public function set blockProgression(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
breakOpportunity | 屬性 |
breakOpportunity:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
將文字分為多行時,控制換行的位置。設定為 BreakOpportunity.AUTO 以一般方式斷行。設定為 BreakOpportunity.NONE 則文字不斷行,除非文字超過度量且沒有其他空間可斷行。。設定為 BreakOpportunity.ANY 可在任意位置斷行,而非只限於在單字之間斷行。設定為 BreakOpportunity.ALL 使每個印刷群集放置於個別行 (對路徑上的文字很實用)。
有效值為 BreakOpportunity.ALL、BreakOpportunity.ANY、BreakOpportunity.AUTO、BreakOpportunity.NONE、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 BreakOpportunity.AUTO。
實作
public function get breakOpportunity():* public function set breakOpportunity(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
cffHinting | 屬性 |
cffHinting:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
用於此文字的 CFF 提示類型。CFF 提示會決定 Flash 執行階段是否強制強式水平詞幹以符合子像素格線。只有當 renderingMode 屬性設定為 RenderingMode.CFF,且字體為內嵌時 (fontLookup 屬性設定為 FontLookup.EMBEDDED_CFF),才會套用此屬性。在小型螢幕上,提示會為讀者產生清晰、易辨識的文字。
有效值為 CFFHinting.NONE、CFFHinting.HORIZONTAL_STEM、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 CFFHinting.HORIZONTAL_STEM。
實作
public function get cffHinting():* public function set cffHinting(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
clearFloats | 屬性 |
clearFloats:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
控制文字圍繞浮動圖的方式。「none」值允許文字以極貼近的方式圍繞浮動圖。「left」值會使文字略過含有左邊浮動圖之容器的任何部分。「right」值會使文字略過含有右邊浮動圖之容器的任何部分。「both」值會使文字略過任何浮動圖。
有效值為 ClearFloats.START、ClearFloats.END、ClearFloats.LEFT、ClearFloats.RIGHT、ClearFloats.BOTH、ClearFloats.NONE 及 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果在重疊顯示時未定義,則此屬性的值就會是 ClearFloats.NONE。
實作
public function get clearFloats():* public function set clearFloats(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內。
|
相關 API 元素
color | 屬性 |
color:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
文字的色彩。指定 3 個 8 位元 RGB (紅色、綠色、藍色) 值的 16 進位數字;例如 0xFF0000 為紅色,而 0x00FF00 為綠色。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 0。
實作
public function get color():* public function set color(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
columnCount | 屬性 |
columnCount:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
文字欄的數目 (如果在重疊顯示時未定義,則採用預設值)。欄的數目會覆寫其他的欄設定。值為整數,如果未指定值,則為 FormatValue.AUTO。如果未指定 columnCount,則會使用 columnWidth 建立容器內可容納的最大欄位數目。
有效字串值為 FormatValue.AUTO、FormatValue.INHERIT 以及從 1 至 50 的整數。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義,則此屬性的值就會是 FormatValue.AUTO。
實作
public function get columnCount():* public function set columnCount(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
columnGap | 屬性 |
columnGap:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
指定欄與欄之間的間距大小 (以像素為單位),如果重疊顯示時未定義,則採用預設值。值為數字
有效值是從 0 到 1000 的數字以及 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義,則此屬性的值就會是 20。
實作
public function get columnGap():* public function set columnGap(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
columnWidth | 屬性 |
columnWidth:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
以像素為單位的欄寬 (如果重疊顯示時未定義,則採用預設值)。如果您指定欄的寬度,而非數目,則在具有容器寬度和 columnGap 設定的情況下,TextLayout 會儘可能建立符合該寬度的最大欄數。在最後一欄之後,任何剩餘的空格都是靠左對齊。值為數字。
有效字串值為 FormatValue.AUTO、FormatValue.INHERIT 以及從 0 到 8000 的數字。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義,則此屬性的值就會是 FormatValue.AUTO。
實作
public function get columnWidth():* public function set columnWidth(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
coreStyles | 屬性 |
defaultFormat | 屬性 |
defaultFormat:flashx.textLayout.formats:ITextLayoutFormat [唯讀] | 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
傳回具有預設設定的 TextLayoutFormat 物件。此方法永遠會傳回相同物件。
實作
public static function get defaultFormat():flashx.textLayout.formats:ITextLayoutFormatdigitCase | 屬性 |
digitCase:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
用於此文字的數字大小寫類型。設定值為 DigitCase.OLD_STYLE 會使用不同的字母上緣和字母下緣模擬小寫字體。數字是等比例的間距。只有在選取的字樣中可使用此樣式,大部分是在補充或專業字體中。DigitCase.LINING 設定具有全部大寫字高度,而且通常在圖表中以固定間距排列。

有效值為 DigitCase.DEFAULT、DigitCase.LINING、DigitCase.OLD_STYLE、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 DigitCase.DEFAULT。
實作
public function get digitCase():* public function set digitCase(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
digitWidth | 屬性 |
digitWidth:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
用於此文字的數字寬度類型。這可以是 DigitWidth.PROPORTIONAL (對於個別數字的顯示效果最佳) 或 DigitWidth.TABULAR (最適用於表格、圖表及垂直行中的數字)。

有效值為 DigitWidth.DEFAULT、DigitWidth.PROPORTIONAL、DigitWidth.TABULAR、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 DigitWidth.DEFAULT。
實作
public function get digitWidth():* public function set digitWidth(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
direction | 屬性 |
direction:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
指定文字區塊內之文字的預設雙向內嵌層級。由左向右的讀取順序,如同拉丁文樣式手寫體,或由右向左的讀取順序,如同阿拉伯文或希伯來文。在容器層級套用此屬性時,它也會影響欄方向。就像文字一樣,欄可以由左向右或由右向左。下面是一些範例:

有效值為 Direction.LTR、Direction.RTL、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性會繼承祖系的值。如果沒有祖系設定此屬性,則值將為 Direction.LTR。
實作
public function get direction():* public function set direction(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
dominantBaseline | 屬性 |
dominantBaseline:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
指定貼齊 alignmentBaseline 的元素基線,以決定行上元素的垂直位置。TextBaseline.AUTO 的值根據父段落的 locale 屬性選取主基線。針對日文與中文,選取的基線值為 TextBaseline.IDEOGRAPHIC_CENTER;其他則為 TextBaseline.ROMAN。這些基線的選擇是由字體及字體大小的選擇所決定。

有效值為 FormatValue.AUTO、TextBaseline.ROMAN、TextBaseline.ASCENT、TextBaseline.DESCENT、TextBaseline.IDEOGRAPHIC_TOP、TextBaseline.IDEOGRAPHIC_CENTER、TextBaseline.IDEOGRAPHIC_BOTTOM、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 FormatValue.AUTO。
實作
public function get dominantBaseline():* public function set dominantBaseline(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
firstBaselineOffset | 屬性 |
firstBaselineOffset:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
指定容器中第一行的基線位置。此屬性參照的基線,是依據容器層級地區而定。對於日文和中文,它會是 TextBaseline.IDEOGRAPHIC_BOTTOM;而對於所有其他語言,則為 TextBaseline.ROMAN。從容器的上方內移距 (或如果 blockProgression 是 RL,則為右方內移距) 到首行基線的偏移量,可以是 BaselineOffset.ASCENT (相當於字行上緣)、BaselineOffset.LINE_HEIGHT (相當於首行高度),或任何固定值數字,以指定絕對距離。BaselineOffset.AUTO 對齊字行上緣與容器上方內移距。




有效字串值為 BaselineOffset.AUTO、BaselineOffset.ASCENT、BaselineOffset.LINE_HEIGHT、FormatValue.INHERIT 以及從 0 到 1000 的數字。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性會繼承祖系的值。如果沒有祖系設定此屬性,則值將為 BaselineOffset.AUTO。
實作
public function get firstBaselineOffset():* public function set firstBaselineOffset(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
fontFamily | 屬性 |
fontFamily:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
要使用的字體名稱,或是以逗號分隔的字體名稱清單。Flash 執行階段會以清單中的第一個可用字體來顯示元素。例如,Arial, Helvetica, _sans 會讓 Player 先搜尋 Arial,如果找不到 Arial 則搜尋 Helvetica,如果這兩項都找不到,則搜尋 _sans。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 Arial。
實作
public function get fontFamily():* public function set fontFamily(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
fontLookup | 屬性 |
fontLookup:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
要使用的字體查詢。指定 FontLookup.DEVICE 使用執行 SWF 檔案之系統上所安裝的字體。裝置字體會導致影片大小變得較小,但文字在不同系統及平台間的顯示不盡相同。指定 FontLookup.EMBEDDED_CFF 使用內嵌於已發佈的 SWF 檔案的字體外框。內嵌的字體會增加 SWF 檔案的大小 (有時差距極大),但文字會一律以所選的字體顯示。
有效值為 FontLookup.DEVICE、FontLookup.EMBEDDED_CFF、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 FontLookup.DEVICE。
實作
public function get fontLookup():* public function set fontLookup(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
fontSize | 屬性 |
fontSize:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
以像素為單位的文字大小。
有效值是從 1 到 720 的數字以及 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 12。
實作
public function get fontSize():* public function set fontSize(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
fontStyle | 屬性 |
fontStyle:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
文字的樣式。可以是 FontPosture.NORMAL (用於純文字) 或 FontPosture.ITALIC (用於斜體字)。此屬性只套用到裝置字體 (fontLookup 屬性設定為 flash.text.engine.FontLookup.DEVICE)。
有效值是 FontPosture.NORMAL、FontPosture.ITALIC、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 FontPosture.NORMAL。
實作
public function get fontStyle():* public function set fontStyle(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
fontWeight | 屬性 |
fontWeight:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
文字的粗細。可以是 FontWeight.NORMAL (用於純文字) 或 FontWeight.BOLD。只套用到裝置字體 (fontLookup 屬性設定為 flash.text.engine.FontLookup.DEVICE)。
有效值為 FontWeight.NORMAL、FontWeight.BOLD、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 FontWeight.NORMAL。
實作
public function get fontWeight():* public function set fontWeight(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
justificationRule | 屬性 |
justificationRule:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
對齊段落中文字所使用的規則。預設值為 FormatValue.AUTO,可根據段落的 locale 屬性來對齊文字。除了日文與中文之外的所有語言,FormatValue.AUTO 會成為 JustificationRule.SPACE,可為空白字元增加額外的空間。針對日文與中文,FormatValue.AUTO 會成為 JustficationRule.EAST_ASIAN。對齊在某種程度上會變更標點符號的間距。在羅馬文字中,逗號與日文句號佔用完整的字元寬度,但是在東亞文字中,則只有一半的字元寬度。此外,在東亞文字中,連續標點符號之間的間距會變得較小,以遵循傳統東亞印刷慣例。請注意,下列範例中,行距會套用至段落的第二行。在東亞版本中,最後兩行向左推送。在羅馬版本中,第二行以及接續的字行向左推送。

有效值為 JustificationRule.EAST_ASIAN、JustificationRule.SPACE、FormatValue.AUTO、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性會繼承祖系的值。如果沒有祖系設定此屬性,則值將為 FormatValue.AUTO。
實作
public function get justificationRule():* public function set justificationRule(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
justificationStyle | 屬性 |
justificationStyle:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
段落對齊所用的樣式。只能與 JustificationRule.EAST_ASIAN 的 justificationRule 設定一起使用。FormatValue.AUTO 的預設值針對所有地區設定解析為 JustificationStyle.PUSH_IN_KINSOKU。JustificationStyle 類別定義的常數指定處理避頭尾字元 (不能在字行開頭或結尾出現的日文字元) 的選項。如果您要加寬文字,請指定 JustificationStyle.PUSH-OUT-ONLY。如果您想要讓行為的效果類似使用 JustificationRule.SPACE 的 justificationRule 的效果,請使用 JustificationStyle.PRIORITIZE-LEAST-ADJUSTMENT。
有效值為 JustificationStyle.PRIORITIZE_LEAST_ADJUSTMENT、JustificationStyle.PUSH_IN_KINSOKU、JustificationStyle.PUSH_OUT_ONLY、FormatValue.AUTO、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性會繼承祖系的值。如果沒有祖系設定此屬性,則值將為 FormatValue.AUTO。
實作
public function get justificationStyle():* public function set justificationStyle(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
kerning | 屬性 |
kerning:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
字距微調會調整某些字元組之間的像素,以改善可讀性。具有特殊字距表的所有字體都支援特殊字距。
有效值為 Kerning.ON、Kerning.OFF、Kerning.AUTO、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 Kerning.AUTO。
實作
public function get kerning():* public function set kerning(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
leadingModel | 屬性 |
leadingModel:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
指定行距模型,它結合了行距基礎及行距方向。行距基礎是 lineHeight 屬性參照的基線。行矩方向決定 lineHeight 屬性參照的是某線條基線與其前線條之間的距離,或是與其後線條之間的距離。FormatValue.AUTO 的預設值乃是根據段落的 locale 屬性來解析。對於日文和中文,它會是 LeadingModel.IDEOGRAPHIC_TOP_DOWN,而對於所有其他語言,則是 LeadingModel.ROMAN_UP。
行距基礎:

行距方向:

有效值為 LeadingModel.ROMAN_UP、LeadingModel.IDEOGRAPHIC_TOP_UP、LeadingModel.IDEOGRAPHIC_CENTER_UP、LeadingModel.IDEOGRAPHIC_TOP_DOWN、LeadingModel.IDEOGRAPHIC_CENTER_DOWN、LeadingModel.APPROXIMATE_TEXT_FIELD、LeadingModel.ASCENT_DESCENT_UP、LeadingModel.BOX、LeadingModel.AUTO、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性會繼承祖系的值。如果沒有祖系設定此屬性,則值將為 LeadingModel.AUTO。
實作
public function get leadingModel():* public function set leadingModel(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
ligatureLevel | 屬性 |
ligatureLevel:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
控制字體中定義的哪些連字可用於文字。這些設定的每一個所顯示的連字與字體有相依性。當兩個以上的字母形式接合為單一字符時,會發生連字。連字通常會取代共享相同組件的連續字元,如字母組「fi」、「fl」或「ae」。連字可用於拉丁文和非拉丁文字元集。由於 LigatureLevel 類別的值 - MINIMUM、COMMON、UNCOMMON 與 EXOTIC 所啟用的連字具有累增效果。每個值啟用一組新的連字,但也包括先前類型。
注意:使用阿拉伯文或斯拉夫文字體時,ligatureLevel 必須設為 MINIMUM 或更大值。

有效值為 LigatureLevel.MINIMUM、LigatureLevel.COMMON、LigatureLevel.UNCOMMON、LigatureLevel.EXOTIC、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 LigatureLevel.COMMON。
實作
public function get ligatureLevel():* public function set ligatureLevel(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
lineBreak | 屬性 |
lineBreak:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
控制容器內的文字換行 (如果重疊顯示時未定義,則採用預設值)。容器中的文字可設定為符合容器寬度 (LineBreak.TO_FIT),或者可設定為只在明確的歸位字元或換行字元 (LineBreak.EXPLICIT) 時斷行。
有效值是 LineBreak.EXPLICIT、LineBreak.TO_FIT、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義,則此屬性的值就會是 LineBreak.TO_FIT。
實作
public function get lineBreak():* public function set lineBreak(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
lineHeight | 屬性 |
lineHeight:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
文字的行距控制。上一行或下一行基線 (根據 LeadingModel) 到目前字行基線的距離等於字行中任一字元所套用的最大行距。這可以是數字或百分比。如果指定百分比,請輸入字串值,如 140%。


有效值是從 -720 到 720 之間的數字。
有效值是從 -1000% 到 1000% 之間數字的百分比。
有效值包括 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 120%。
實作
public function get lineHeight():* public function set lineHeight(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
lineThrough | 屬性 |
lineThrough:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
若為 true,將套用刪除線,亦即通過文字中間的線。
有效值為 true、false 與 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 false。
實作
public function get lineThrough():* public function set lineThrough(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
linkActiveFormat | 屬性 |
linkActiveFormat:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
定義正常狀態下的連結格式屬性。這個值會貫穿整個階層而且會套用至任何為後代的連結。接受 inherit、ITextLayoutFormat 或將具有索引鍵及值做為成員的物件陣列轉換為 TextLayoutFormat。
有效值包括 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性會繼承祖系的值。如果沒有祖系設定此屬性,則值將為 null。
實作
public function get linkActiveFormat():* public function set linkActiveFormat(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內。
|
linkHoverFormat | 屬性 |
linkHoverFormat:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
當滑鼠在連結的邊緣之內 (或上方) 時,定義用於懸浮狀態下的連結格式屬性。這個值會貫穿整個階層而且會套用至任何為後代的連結。接受 inherit、ITextLayoutFormat 或將具有索引鍵及值做為成員的物件陣列轉換為 TextLayoutFormat。
有效值包括 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 null。
實作
public function get linkHoverFormat():* public function set linkHoverFormat(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內。
|
linkNormalFormat | 屬性 |
linkNormalFormat:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
定義正常狀態下的連結格式屬性。這個值會貫穿整個階層而且會套用至任何為後代的連結。接受 inherit、ITextLayoutFormat 或將具有索引鍵及值做為成員的物件陣列轉換為 TextLayoutFormat。
有效值包括 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性會繼承祖系的值。如果沒有祖系設定此屬性,則值將為 null。
實作
public function get linkNormalFormat():* public function set linkNormalFormat(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內。
|
listAutoPadding | 屬性 |
listAutoPadding:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
當該邊上的清單邊框距離值為 auto 時,指定清單的開頭邊緣自動縮排。
有效值是從 -1000 到 1000 的數字以及 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性會繼承祖系的值。如果沒有祖系設定此屬性,則值將為 40。
實作
public function get listAutoPadding():* public function set listAutoPadding(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
listMarkerFormat | 屬性 |
listMarkerFormat:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
定義格式屬性清單標記。這個值會貫穿整個階層而且會套用至任何為後代的連結。接受 inherit、IListMarkerFormat 或將具有索引鍵及值做為成員的物件陣列轉換為 ListMarkerFormat。
有效值包括 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性會繼承祖系的值。如果沒有祖系設定此屬性,則值將為 null。
實作
public function get listMarkerFormat():* public function set listMarkerFormat(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內。
|
listStylePosition | 屬性 |
listStylePosition:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
有效值為 ListStylePosition.INSIDE、ListStylePosition.OUTSIDE、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性會繼承祖系的值。如果沒有祖系設定此屬性,則值將為 ListStylePosition.OUTSIDE。
實作
public function get listStylePosition():* public function set listStylePosition(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
listStyleType | 屬性 |
listStyleType:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
有效值為 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。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性會繼承祖系的值。如果沒有祖系設定此屬性,則值將為 ListStyleType.DISC。
實作
public function get listStyleType():* public function set listStyleType(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
locale | 屬性 |
locale:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
文字的地區。控制大小寫轉換和形狀。使用 Unicode Technical Standard #35 中描述的標準地區識別名稱。例如 en、en_US 以及 en-US 都是英文,ja 則是日文。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 en。
實作
public function get locale():* public function set locale(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
paddingBottom | 屬性 |
paddingBottom:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
下方內移距 (以像素為單位)。除了開端邊框距離為 45 的清單以外,auto 的預設值均為零 (如果重疊顯示時未定義,則採用預設值)。容器下方邊緣與文字之間的間距。值為 Number 或 auto。
使用水平文字時,在具有多欄的可捲動容器中,第一欄及接續各欄會在容器結尾以空格顯示邊框距離,但在最後一欄,如果文字無法完全填入,則必須捲動才能看到邊框距離。
有效字串值為 FormatValue.AUTO、FormatValue.INHERIT 以及從 -8000 到 8000 的數字。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義,則此屬性的值就會是 FormatValue.AUTO。
實作
public function get paddingBottom():* public function set paddingBottom(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
paddingLeft | 屬性 |
paddingLeft:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
左方內移距 (以像素為單位)。除了開端邊框距離為 45 的清單以外,auto 的預設值均為零 (如果重疊顯示時未定義,則採用預設值)。容器左方邊緣與文字之間的間距。值為 Number 或 auto。
使用垂直文字時,在具有多欄的可捲動容器中,第一欄及接續各欄會在容器結尾以空格顯示邊框距離,但在最後一欄,如果文字無法完全填入,則必須捲動才能看到邊框距離。
有效字串值為 FormatValue.AUTO、FormatValue.INHERIT 以及從 -8000 到 8000 的數字。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義,則此屬性的值就會是 FormatValue.AUTO。
實作
public function get paddingLeft():* public function set paddingLeft(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
paddingRight | 屬性 |
paddingRight:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
右方內移距 (以像素為單位)。除了開端邊框距離為 45 的清單以外,auto 的預設值均為零 (如果重疊顯示時未定義,則採用預設值)。容器右方邊緣與文字之間的間距。值為 Number 或 auto。
有效字串值為 FormatValue.AUTO、FormatValue.INHERIT 以及從 -8000 到 8000 的數字。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義,則此屬性的值就會是 FormatValue.AUTO。
實作
public function get paddingRight():* public function set paddingRight(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
paddingTop | 屬性 |
paddingTop:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
上方內移距 (以像素為單位)。除了開端邊框距離為 45 的清單以外,auto 的預設值均為零 (如果重疊顯示時未定義,則採用預設值)。容器上方邊緣與文字之間的間距。值為 Number 或 auto。
有效字串值為 FormatValue.AUTO、FormatValue.INHERIT 以及從 -8000 到 8000 的數字。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義,則此屬性的值就會是 FormatValue.AUTO。
實作
public function get paddingTop():* public function set paddingTop(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
paragraphEndIndent | 屬性 |
paragraphEndIndent:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
指定段落結尾邊緣縮排量的數字 (以像素為單位)。參考由左至右文字的右邊,與由右至左文字的左邊。
有效值是從 0 到 8000 的數字以及 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 0。
實作
public function get paragraphEndIndent():* public function set paragraphEndIndent(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
paragraphSpaceAfter | 屬性 |
paragraphSpaceAfter:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
指定段落之後保留的間距大小的數字 (以像素為單位)。使用 paragraphSpaceBefore 在前後收合。
有效值是從 0 到 8000 的數字以及 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 0。
實作
public function get paragraphSpaceAfter():* public function set paragraphSpaceAfter(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
paragraphSpaceBefore | 屬性 |
paragraphSpaceBefore:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
指定段落之前保留的間距大小的數字 (以像素為單位)。使用 paragraphSpaceAfter 在前後收合。
有效值是從 0 到 8000 的數字以及 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 0。
實作
public function get paragraphSpaceBefore():* public function set paragraphSpaceBefore(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
paragraphStartIndent | 屬性 |
paragraphStartIndent:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
指定段落開頭邊緣縮排量的數字 (以像素為單位)。參考由左至右文字的左邊,與由右至左文字的右邊。
有效值是從 0 到 8000 的數字以及 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 0。
實作
public function get paragraphStartIndent():* public function set paragraphStartIndent(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
renderingMode | 屬性 |
renderingMode:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
用於此文字的顯示模式。只套用到內嵌字體 (fontLookup 屬性設定為 FontLookup.EMBEDDED_CFF)。
有效值是 RenderingMode.NORMAL、RenderingMode.CFF、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 RenderingMode.CFF。
實作
public function get renderingMode():* public function set renderingMode(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
styleName | 屬性 |
styleName:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
指定元素的識別類別,如此只要參照此 styleName 就可以設定元素的樣式。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義,則此屬性的值就會是 null。
實作
public function get styleName():* public function set styleName(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內。
|
styles | 屬性 |
tabStops | 屬性 |
tabStops:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
指定段落關聯的定位停駐點。Setter 可以使用 TabStopFormat 的陣列、壓縮字串表示法、未定義或 FormatValue.INHERIT。壓縮字串表示法一律轉換為 TabStopFormat 的陣列。
字串基礎格式是一份定位停駐點清單,其中使用一或多個空格分隔每個定位停駐點。
定位停駐點會採用下列格式:<alignment type><alignment position>|<alignment token>。
對齊類型是單一字元,可以是 S、E、C 或 D (或對等的小寫字母)。S 或 s 表示開頭 (start),E 或 e 表示結尾 (end),C 或 c 表示中間 (center),D 或 d 表示小數 (decimal)。對齊類型是選擇性項目,如果未指定,則預設為 S。
對齊位置是一個數字,並根據數字 (小數或科學標記法) 的 FXG 規格指定。需要有對齊位置。
垂直分隔列用於分隔對齊位置與對齊字符,並應只在對齊字符存在時才出現。
如果對齊類型是 D,則對齊字符為選擇性,而且如果對齊類型不是 D,就不應出現。對齊字符可以是由任何結束定位停駐點的空格所終止的字元順序 (對於最後一個定位停駐點而言,終止間距是選擇性的;對齊字符的結尾是隱含的)。如果使用反斜線 (\) 跳開,則空格可做為對齊字符的一部分。如果使用另一個反斜線 (\\) 跳開,則反斜線可做為對齊字符的一部分。如果對齊方式類型為 D,且未指定對齊字符,則會採用 null 預設值。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性會繼承祖系的值。如果沒有祖系設定此屬性,則值將為 null。
實作
public function get tabStops():* public function set tabStops(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
textAlign | 屬性 |
textAlign:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
段落中各行相對於容器的對齊方式。TextAlign.LEFT 沿著容器左方邊緣對齊字行。TextAlign.RIGHT 對齊右方邊緣。TextAlign.CENTER 讓字行的左方及右方邊緣等距。TextAlign.JUSTIFY 會延展行以填滿空間。TextAlign.START 等同於設定由左向右文字的靠左對齊,或由右向左文字的靠右對齊。TextAlign.END 等同於設定由左向右文字的靠右對齊,或由右向左文字的靠左對齊。
有效值為 TextAlign.LEFT、TextAlign.RIGHT、TextAlign.CENTER、TextAlign.JUSTIFY、TextAlign.START、TextAlign.END、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 TextAlign.START。
實作
public function get textAlign():* public function set textAlign(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
textAlignLast | 屬性 |
textAlignLast:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
段落中最後 (或唯一的) 一行相對於齊行文字中之容器的對齊方式。如果 textAlign 設定為 TextAlign.JUSTIFY,textAlignLast 會指定最後一行 (或唯一的一行,如果這是一個單行區塊時) 的對齊方式。值類似於 textAlign。
有效值為 TextAlign.LEFT、TextAlign.RIGHT、TextAlign.CENTER、TextAlign.JUSTIFY、TextAlign.START、TextAlign.END、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 TextAlign.START。
實作
public function get textAlignLast():* public function set textAlignLast(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
textAlpha | 屬性 |
textAlpha:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
文字的 Alpha (透明) 值。值為 0 時表示完全透明,值為 1 時表示完全不透明。textAlpha 設為 0 的顯示物件都是作用中狀態,即便看不見亦是如此。
有效值是從 0 到 1 的數字以及 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 1。
實作
public function get textAlpha():* public function set textAlpha(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
textDecoration | 屬性 |
textDecoration:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
文字上的裝飾。用於套用底線;預設為 none。
有效值為 TextDecoration.NONE、TextDecoration.UNDERLINE、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 TextDecoration.NONE。
實作
public function get textDecoration():* public function set textDecoration(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
textIndent | 屬性 |
textIndent:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
以像素為單位,指定段落中第一行縮排量的數字。負值縮排會將行推向邊界,因而可能超出容器。
有效值是從 -8000 到 8000 的數字以及 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 0。
實作
public function get textIndent():* public function set textIndent(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
textJustify | 屬性 |
textJustify:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
指定對齊文字的選項。預設值為 TextJustify.INTER_WORD,表示將額外空間增加到空白字元。TextJustify.DISTRIBUTE 將額外空間增加到空白字元以及個別字母之間。僅與 JustificationRule.SPACE 的 justificationRule 值一併使用。
有效值為 TextJustify.INTER_WORD、TextJustify.DISTRIBUTE、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性會繼承祖系的值。如果沒有祖系設定此屬性,則值將為 TextJustify.INTER_WORD。
實作
public function get textJustify():* public function set textJustify(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
textRotation | 屬性 |
textRotation:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
決定此文字要旋轉的度數。
有效值為 TextRotation.ROTATE_0、TextRotation.ROTATE_180、TextRotation.ROTATE_270、TextRotation.ROTATE_90、TextRotation.AUTO、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 TextRotation.AUTO。
實作
public function get textRotation():* public function set textRotation(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
trackingLeft | 屬性 |
trackingLeft:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
以像素為單位代表要套用至每個字元左側字距調整 (手動字距微調) 量的數字 (或 fontSize 的百分比,例如,120%)。如果已啟用特殊字距,trackingLeft 值就會加入到該字體之特殊字距表中的值。如果已停用特殊字距,trackingLeft 值會當做手動特殊字距值來使用。同時支援正值與負值。
有效值是從 -1000 到 1000 之間的數字。
有效值是從 -1000% 到 1000% 之間數字的百分比。
有效值包括 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 0。
實作
public function get trackingLeft():* public function set trackingLeft(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
trackingRight | 屬性 |
trackingRight:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
以像素為單位代表要套用至每個字元右側字距調整 (手動字距微調) 量的數字 (或 fontSize 的百分比,例如,120%)。如果已啟用特殊字距,trackingRight 值就會加入到該字體之特殊字距表中的值。如果已停用特殊字距,trackingRight 值會當做手動特殊字距值來使用。同時支援正值與負值。
有效值是從 -1000 到 1000 之間的數字。
有效值是從 -1000% 到 1000% 之間數字的百分比。
有效值包括 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 0。
實作
public function get trackingRight():* public function set trackingRight(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
typographicCase | 屬性 |
typographicCase:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
用於此文字的印刷大小寫類型。下面是一些範例:

有效值是 TLFTypographicCase.DEFAULT、TLFTypographicCase.CAPS_TO_SMALL_CAPS、TLFTypographicCase.UPPERCASE、TLFTypographicCase.LOWERCASE、TLFTypographicCase.LOWERCASE_TO_SMALL_CAPS、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 TLFTypographicCase.DEFAULT。
實作
public function get typographicCase():* public function set typographicCase(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
userStyles | 屬性 |
verticalAlign | 屬性 |
verticalAlign:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
垂直對齊或齊行 (如果重疊顯示時未定義,則採用預設值)。決定容器內 TextFlow 元素的對齊方式。
有效值是 VerticalAlign.TOP、VerticalAlign.MIDDLE、VerticalAlign.BOTTOM、VerticalAlign.JUSTIFY、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義,則此屬性的值就會是 VerticalAlign.TOP。
實作
public function get verticalAlign():* public function set verticalAlign(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
whiteSpaceCollapse | 屬性 |
whiteSpaceCollapse:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
將文字匯入 TextFlow 時捨去或保留空格。WhiteSpaceCollapse.PRESERVE 保留所有空白字元。WhiteSpaceCollapse.COLLAPSE 移除匯入文字區塊內的換行、定位點以及開頭和結尾空白。斷行標籤 () 和 Unicode 字行分隔符號字元都將保留。
有效值為 WhiteSpaceCollapse.PRESERVE、WhiteSpaceCollapse.COLLAPSE、FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性將繼承祖系的值。如果沒有祖系設定此屬性,則值將為 WhiteSpaceCollapse.COLLAPSE。
實作
public function get whiteSpaceCollapse():* public function set whiteSpaceCollapse(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
wordSpacing | 屬性 |
wordSpacing:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
指定對齊時要使用之文字間的最佳、最小和最大間距 (標準間距的倍數)。最佳間距可用來指定所需的間距大小,以作為字體中定義之值的分數。textJustify 為均分時會使用最小和最大值,以決定文字之間的間距寬窄,然後才使用字元間距來對齊行。
有效值是從 -1000% 到 1000% 之間數字的百分比。
有效值包括 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義此屬性,則此屬性會繼承祖系的值。如果沒有祖系設定此屬性,則值將為 100%、50%、150%。
實作
public function get wordSpacing():* public function set wordSpacing(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
TextLayoutFormat | () | 建構函式 |
public function TextLayoutFormat(initialValues:flashx.textLayout.formats:ITextLayoutFormat = null)| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
建立新的 TextLayoutFormat 物件。所有設定為空白,或者可以選擇從提供的 initialValues 物件初始化。
initialValues:flashx.textLayout.formats:ITextLayoutFormat (default = null) — 要複製其初始值的選擇性實體。
|
相關 API 元素
apply | () | 方法 |
public function apply(incoming:flashx.textLayout.formats:ITextLayoutFormat):void| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
以 incoming ITextLayoutFormat 實體中設定的屬性值取代此 TextLayoutFormat 物件中屬性的值。incoming ITextLayoutFormat 實體中 undefined 的屬性並未在此物件中變更。
參數
incoming:flashx.textLayout.formats:ITextLayoutFormat — 此 TextLayoutFormat 物件套用其屬性值的實體。
|
範例 ( 如何使用本範例 )
package flashx.textLayout.formats.examples {
import flash.display.Sprite;
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.formats.TextLayoutFormat;
public class TextLayoutFormat_applyExample extends Sprite
{
public function TextLayoutFormat_applyExample()
{
// create a container and add it to the stage
var container:Sprite = new Sprite();
this.stage.addChild(container);
// create TextFlow, ParagraphElement, and SpanElement objects
var textFlow:TextFlow = new TextFlow();
var p:ParagraphElement = new ParagraphElement();
var span:SpanElement = new SpanElement();
// create two TextLayoutFormat objects
var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
var textLayoutFormat2:TextLayoutFormat = new TextLayoutFormat();
// set format attributes in the first one
textLayoutFormat.textIndent = 8;
textLayoutFormat.color = 0x336633;
textLayoutFormat.fontFamily = "Arial, Helvetica, _sans";
textLayoutFormat.fontSize = 24;
// set some of the same attributes on the second one
textLayoutFormat2.color = 0x0000CC;
textLayoutFormat2.fontSize = 12;
textLayoutFormat2.textIndent = 24;
// add text to the span, the span to the paragraph, and the paragraph to the text flow.
span.text = "Notice that fontFamily is unchanged because it was undefined in textLayoutFormat2.";
p.addChild( span);
textFlow.addChild(p);
// use apply() to apply textLayoutFormat2 format settings; assign format to the text flow
textLayoutFormat.apply(textLayoutFormat2);
textFlow.hostFormat = textLayoutFormat;
// add paragraph to textFlow and update controller to display it
textFlow.addChild(p);
var controller:ContainerController = new ContainerController(container, 200, 200 );
textFlow.flowComposer.addController(controller);
textFlow.flowComposer.updateAllControllers();
}
}
}
concat | () | 方法 |
public function concat(incoming:flashx.textLayout.formats:ITextLayoutFormat):void| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
以此 TextLayoutFormat 物件的值連接 incoming ITextLayoutFormat 實體中的屬性值。在此 (接收) TextLayoutFormat 物件中,值為 FormatValue.INHERIT 的屬性,以及值為 undefined的繼承屬性,將從 incoming 物件取得新值。值為 undefined 的非繼承屬性將取得其預設值。所有其他屬性將維持不變。
參數
incoming:flashx.textLayout.formats:ITextLayoutFormat — 值開始連接的實體。
|
相關 API 元素
範例 ( 如何使用本範例 )
package flashx.textLayout.formats.examples {
import flash.display.Sprite;
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.formats.TextLayoutFormat;
public class TextLayoutFormat_concatExample extends Sprite
{
public function TextLayoutFormat_concatExample()
{
// create a container and add it to the stage
var container:Sprite = new Sprite();
this.stage.addChild(container);
// create TextFlow, ParagraphElement, and SpanElement objects
var textFlow:TextFlow = new TextFlow();
var p:ParagraphElement = new ParagraphElement();
var span:SpanElement = new SpanElement();
// create two TextLayoutFormat objects
var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
var textLayoutFormat2:TextLayoutFormat = new TextLayoutFormat();
// set format attributes in the first one
textLayoutFormat.textIndent = 8;
textLayoutFormat.color = 0x336633;
textLayoutFormat.fontSize = 18;
// set some of the same attributes on the second one
textLayoutFormat2.textIndent = 24;
textLayoutFormat2.color = 0x0000CC;
textLayoutFormat2.fontSize = 12;
textLayoutFormat2.fontFamily = "Arial, Helvetica, _sans";
// concat textLayoutFormat2 settings; assign format to the text flow
textLayoutFormat.concat(textLayoutFormat2);
textFlow.hostFormat = textLayoutFormat;
// add text to the span, the span to the paragraph, and the paragraph to the text flow.
span.text = "Notice that fontFamily value has been added from textLayout2 to textLayout but " +
"the other values have not been changed.";
p.addChild( span);
textFlow.addChild(p);
// update controller to display it
var controller:ContainerController = new ContainerController(container, 200, 200 );
textFlow.flowComposer.addController(controller);
textFlow.flowComposer.updateAllControllers();
}
}
}
concatInheritOnly | () | 方法 |
public function concatInheritOnly(incoming:flashx.textLayout.formats:ITextLayoutFormat):void| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
以此 TextLayoutFormat 物件的值連接 incoming ITextLayoutFormat 實體中的屬性值。在此 (接收) TextLayoutFormat 物件中,值為 FormatValue.INHERIT 的屬性,以及值為 undefined的繼承屬性,將從 incoming 物件取得新值。所有其他屬性將維持不變。
參數
incoming:flashx.textLayout.formats:ITextLayoutFormat — 值開始連接的實體。
|
相關 API 元素
範例 ( 如何使用本範例 )
package flashx.textLayout.formats.examples {
import flash.display.Sprite;
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.formats.TextLayoutFormat;
public class TextLayoutFormat_concatInheritOnlyExample extends Sprite
{
public function TextLayoutFormat_concatInheritOnlyExample()
{
// create a container and add it to the stage
var container:Sprite = new Sprite();
this.stage.addChild(container);
// create TextFlow, ParagraphElement, and SpanElement objects
var textFlow:TextFlow = new TextFlow();
var p:ParagraphElement = new ParagraphElement();
var span:SpanElement = new SpanElement();
// create two TextLayoutFormat objects
var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
var textLayoutFormat2:TextLayoutFormat = new TextLayoutFormat();
// set format attributes in the first one
textLayoutFormat.color = 0xFF0000;
textLayoutFormat.fontSize = undefined;
// set attributes on the second one (fontSize set here, too)
textLayoutFormat2.color = 0x00FF00;
textLayoutFormat2.backgroundColor = 0x00CCCC;
textLayoutFormat2.fontSize = 16;
textLayoutFormat2.fontFamily = "Times Roman";
// concat textLayoutFormat2 settings; assign format to the text flow
textLayoutFormat.concatInheritOnly(textLayoutFormat2);
textFlow.hostFormat = textLayoutFormat;
// add text to the span, the span to the paragraph, and the paragraph to the text flow.
span.text = "Notice that the value of backgroundColor is "
span.text += textLayoutFormat.backgroundColor;
span.text += ", even though it is set in textLayoutFormat2. This is because " +
"this property does not inherit. Also notice that font color does not change " +
"because it is not undefined."
p.addChild( span);
textFlow.addChild(p);
// update controller to display it
var controller:ContainerController = new ContainerController(container, 200, 200 );
textFlow.flowComposer.addController(controller);
textFlow.flowComposer.updateAllControllers();
}
}
}
copy | () | 方法 |
public function copy(incoming:flashx.textLayout.formats:ITextLayoutFormat):void| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
從 ITextLayoutFormat 實體的 values 複製 TextLayoutFormat 設定到此 TextLayoutFormat 物件。如果 values 是 null,則此 TextLayoutFormat 物件的所有屬性會初始化為未定義值。
參數
incoming:flashx.textLayout.formats:ITextLayoutFormat — 要複製其值的選擇性實體。
|
範例 ( 如何使用本範例 )
package flashx.textLayout.formats.examples {
import flash.display.Sprite;
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.formats.TextLayoutFormat;
public class TextLayoutFormat_copyExample extends Sprite
{
public function TextLayoutFormat_copyExample()
{
// create a container and add it to the stage
var container:Sprite = new Sprite();
this.stage.addChild(container);
// create TextFlow, ParagraphElement, and SpanElement objects
var textFlow:TextFlow = new TextFlow();
var p:ParagraphElement = new ParagraphElement();
var span:SpanElement = new SpanElement();
// create two TextLayoutFormat objects
var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
var textLayoutFormat2:TextLayoutFormat = new TextLayoutFormat();
// set format attributes in the second one
textLayoutFormat2.textIndent = 8;
textLayoutFormat2.color = 0x336633;
textLayoutFormat2.fontFamily = "Times Roman";
textLayoutFormat2.fontSize = 18;
// add text to the span, the span to the paragraph, and the paragraph to the text flow.
span.text = "Notice that formatting values set in textLayoutFormat2 override " +
"the default values in textLayoutFormat.";
p.addChild(span);
textFlow.addChild(p);
// copy format settings of textLayoutFormat2; assign format to the text flow
textLayoutFormat.copy(textLayoutFormat2);
textFlow.hostFormat = textLayoutFormat;
// add paragraph to textFlow and update controller to display it
textFlow.addChild(p);
var controller:ContainerController = new ContainerController(container, 200, 200 );
textFlow.flowComposer.addController(controller);
textFlow.flowComposer.updateAllControllers();
}
}
}
createTextLayoutFormat | () | 方法 |
public static function createTextLayoutFormat(initialValues:Object):flashx.textLayout.formats:TextLayoutFormat| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
建立新的 TextLayoutFormat 物件。所有設定為空白,或者可以選擇從提供的 initialValues 物件初始化。
參數
initialValues:Object — 如果複製 ITextLayoutFormat 物件的值,則為要複製其初始值的選擇性實體 ()。否則,此參數會被視為 Dictionary 或 Object 並重複執行。
|
flashx.textLayout.formats:TextLayoutFormat |
getStyle | () | 方法 |
isEqual | () | 方法 |
public static function isEqual(p1:flashx.textLayout.formats:ITextLayoutFormat, p2:flashx.textLayout.formats:ITextLayoutFormat):Boolean| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
比較 ITextLayoutFormat 實體 p1 中的屬性以及 ITextLayoutFormat 實體 p2 中的屬性,如果所有屬性相符,則傳回 true。
參數
p1:flashx.textLayout.formats:ITextLayoutFormat — 與 p2 比較的實體。
| |
p2:flashx.textLayout.formats:ITextLayoutFormat — 與 p1 比較的實體。
|
Boolean — 如果所有屬性相符則為 true,否則為 false。
|
removeClashing | () | 方法 |
public function removeClashing(incoming:flashx.textLayout.formats:ITextLayoutFormat):void| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
如果此 TextLayoutFormat 物件中的屬性與 incoming ITextLayoutFormat 實體中的屬性不相符,則將此 TextLayoutFormat 物件中的屬性設定為 undefined。
參數
incoming:flashx.textLayout.formats:ITextLayoutFormat — 與此 TextLayoutFormat 物件的屬性值比較的實體。
|
範例 ( 如何使用本範例 )
undefined,取消已套用的值。
package flashx.textLayout.formats.examples {
import flash.display.Sprite;
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.formats.TextLayoutFormat;
public class TextLayoutFormat_removeClashingExample extends Sprite
{
public function TextLayoutFormat_removeClashingExample()
{
// create a container and add it to the stage
var container:Sprite = new Sprite();
this.stage.addChild(container);
// create TextFlow, ParagraphElement, and SpanElement objects
var textFlow:TextFlow = new TextFlow();
var p:ParagraphElement = new ParagraphElement();
var span:SpanElement = new SpanElement();
// create two TextLayoutFormat objects
var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
var textLayoutFormat2:TextLayoutFormat = new TextLayoutFormat();
// set format attributes for textLayoutFormat2
textLayoutFormat.textIndent = 8;
textLayoutFormat.color = 0x336633;
textLayoutFormat.fontFamily = "Arial, Helvetica, _sans";
textLayoutFormat.fontSize = 24;
// set fontFamily to same value for textLayoutFormat2
textLayoutFormat2.fontFamily = "Arial, Helvetica, _sans";
// add text to the span, the span to the paragraph, and the paragraph to the text flow.
span.text = "Notice that fontFamily (Arial, Helvetica, _sans) is applied."
p.addChild( span);
textFlow.addChild(p);
// call removeClashing(), cancelling any values that clash with textLayoutFormat;
// assign it to the text flow
textLayoutFormat.removeClashing(textLayoutFormat2);
textFlow.hostFormat = textLayoutFormat;
// add paragraph to textFlow and update controller to display it
textFlow.addChild(p);
var controller:ContainerController = new ContainerController(container, 200, 200 );
textFlow.flowComposer.addController(controller);
textFlow.flowComposer.updateAllControllers();
}
}
}
removeMatching | () | 方法 |
public function removeMatching(incoming:flashx.textLayout.formats:ITextLayoutFormat):void| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
如果此 TextLayoutFormat 物件中的屬性與 incoming ITextLayoutFormat 實體中的屬性相符,則將此 TextLayoutFormat 物件中的屬性設定為 undefined。
參數
incoming:flashx.textLayout.formats:ITextLayoutFormat — 與此 TextLayoutFormat 物件的屬性值比較的實體。
|
範例 ( 如何使用本範例 )
package flashx.textLayout.formats.examples {
import flash.display.Sprite;
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.formats.TextLayoutFormat;
public class TextLayoutFormat_removeMatchingExample extends Sprite
{
public function TextLayoutFormat_removeMatchingExample()
{
// create a container and add it to the stage
var container:Sprite = new Sprite();
this.stage.addChild(container);
// create TextFlow, ParagraphElement, and SpanElement objects
var textFlow:TextFlow = new TextFlow();
var p:ParagraphElement = new ParagraphElement();
var span:SpanElement = new SpanElement();
// create two TextLayoutFormat objects
var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
var textLayoutFormat2:TextLayoutFormat = new TextLayoutFormat();
// set format attributes for textLayoutFormat
textLayoutFormat.textIndent = 8;
textLayoutFormat.color = 0x336633;
textLayoutFormat.fontFamily = "Arial, Helvetica, _sans";
textLayoutFormat.fontSize = 24;
// add text to the span, the span to the paragraph, and the paragraph to the text flow
span.text = "Notice that fontFamily (Arial, Helvetica, _sans) is not applied."
p.addChild( span);
textFlow.addChild(p);
// set fontFamily to same value for textLayoutFormat2
textLayoutFormat2.fontFamily = "Arial, Helvetica, _sans";
// call removeMatching() to remove any values that match textLayoutFormat2;
// assign textLayoutFormat to the text flow
textLayoutFormat.removeMatching(textLayoutFormat2);
textFlow.hostFormat = textLayoutFormat;
// add paragraph to textFlow and update controller to display it
textFlow.addChild(p);
var controller:ContainerController = new ContainerController(container, 200, 200 );
textFlow.flowComposer.addController(controller);
textFlow.flowComposer.updateAllControllers();
}
}
}
setStyle | () | 方法 |
lineHeight) 設定為 140%。
package flashx.textLayout.formats.examples
{
import flash.display.Sprite;
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.formats.TabStopFormat;
import flashx.textLayout.formats.TextLayoutFormat;
import flash.text.engine.TabAlignment;
public class TextLayoutFormatExample extends Sprite
{
public function TextLayoutFormatExample()
{
var textFlow:TextFlow = new TextFlow();
var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
textLayoutFormat.paragraphStartIndent = 15;
textLayoutFormat.paragraphSpaceBefore = 15;
textLayoutFormat.paragraphEndIndent = 15;
textLayoutFormat.paragraphSpaceAfter = 15;
textLayoutFormat.textIndent = 20;
textLayoutFormat.color = 0x336633;
textLayoutFormat.fontFamily = "Arial, Helvetica, _sans";
textLayoutFormat.fontSize = 14;
textLayoutFormat.kerning = flash.text.engine.Kerning.ON;
textLayoutFormat.lineHeight = "140%";
var tabStop1:TabStopFormat = new TabStopFormat();
tabStop1.alignment = flash.text.engine.TabAlignment.START;
tabStop1.position = 40;
textLayoutFormat.tabStops = new Array(tabStop1);
textFlow.hostFormat = textLayoutFormat;
var p:ParagraphElement = new ParagraphElement();
var span:SpanElement = new SpanElement();
span.text = "This example formats a paragraph with 15 pixel margins, a 20 pixel first " +
"line indent, and a left-aligned tab stop at 40 pixels (last line). It uses the " +
"Arial font (with alternate device fonts), sets the size to 14 pixels, the color to green, " +
" turns on kerning, \n \t and sets leading (lineHeight) to 140%.";
p.addChildAt(0, span);
textFlow.addChildAt(0, p);
textFlow.flowComposer.addController(new ContainerController(this,310,200));
textFlow.flowComposer.updateAllControllers();
}
}
}
package flashx.textLayout.formats.examples
{
import flash.display.Sprite;
import flash.system.Capabilities;
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.conversion.TextConverter;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.formats.BlockProgression;
import flashx.textLayout.formats.JustificationRule;
import flashx.textLayout.formats.TextLayoutFormat;
import flashx.textLayout.formats.VerticalAlign;
public class TextLayoutFormatExample2 extends Sprite
{
public function TextLayoutFormatExample2()
{
// create TextFlow object
var textFlow:TextFlow = new TextFlow();
// create TextLayoutFormat object
var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
// define Japanese text in a string of Unicode characters
var jaText:String = String.fromCharCode(
0x30AF, 0x30ED, 0x30B9, 0x30D7, 0x30E9, 0x30C3, 0x30C8, 0x30D5,
0x30A9, 0x30FC, 0x30E0, 0x4E0A, 0x3067, 0x518D, 0x751F, 0x53EF,
0x80FD, 0x306A
) +
"Flash Video" +
String.fromCharCode(
0x3092, 0x914D, 0x4FE1, 0x3001, 0x653F, 0x5E9C, 0x6700, 0x65B0,
0x60C5, 0x5831, 0x3092, 0x3088, 0x308A, 0x591A, 0x304F, 0x306E,
0x56FD, 0x6C11, 0x306B, 0x9AD8, 0x54C1, 0x8CEA, 0x306A, 0x753B,
0x50CF, 0x3067, 0x7C21, 0x5358, 0x304B, 0x3064, 0x30EA, 0x30A2,
0x30EB, 0x30BF, 0x30A4, 0x30E0, 0x306B, 0x63D0, 0x4F9B, 0x3059,
0x308B, 0x3053, 0x3068, 0x304C, 0x53EF, 0x80FD, 0x306B, 0x306A,
0x308A, 0x307e, 0x3057, 0x305F, 0x3002);
// convert the text into a TextFlow object
textFlow = TextConverter.importToFlow(jaText, TextConverter.PLAIN_TEXT_FORMAT);
// set the locale and fontFamily
textLayoutFormat.locale = "ja";
if (Capabilities.os.search("Mac OS") > -1)
textLayoutFormat.fontFamily = String.fromCharCode(0x5C0F, 0x585A, 0x660E, 0x671D) + " Pro R"; // "Kozuka Mincho Pro R" koFont.fontName = "Adobe " + String.fromCharCode(0xBA85, 0xC870) + " Std M"; // "Adobe Myungjo Std M"
else
textLayoutFormat.fontFamily = "Kozuka Mincho Pro R";
// specify right-to-left block progression, east Asian justification, and top vertical alignment
textLayoutFormat.blockProgression = BlockProgression.RL;
textLayoutFormat.justificationRule = JustificationRule.EAST_ASIAN;
textLayoutFormat.verticalAlign = VerticalAlign.TOP;
textFlow.hostFormat = textLayoutFormat;
// add controller and update to display text
textFlow.flowComposer.addController(new ContainerController(this, 300, 200));
textFlow.flowComposer.updateAllControllers();
}
}
}
Tue Jun 12 2018, 03:47 PM Z
隱藏繼承公用屬性
顯示繼承公用屬性