2012-02-17 64 views
0

如何設置s:label的直通式樣,如css text-decoration:line-through火花標籤的直通式樣

+0

不要以爲你可以。您必須使用支持html格式的組件。 – RIAstar 2012-02-17 12:46:03

回答

2

有一種叫lineThrough的風格。這是一個Boolean,所以只需將其設置爲true


文檔: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Label.html#style:lineThrough

spark.components.Label.as有一個include "../styles/metadata/BasicInheritingTextStyles.as",並且文件包含以下的這段定義lineThrough

/** 
* If true, applies strikethrough, a line drawn through the middle of the text. 
* 
* <p><b>For the Spark theme, see 
* flashx.textLayout.formats.ITextLayoutFormat.lineThrough</b></p> 
* 
* <p><b>For the Mobile theme, this is not supported.</b></p> 
* 
* @see flashx.textLayout.formats.ITextLayoutFormat#lineThrough 
* 
* @langversion 3.0 
* @playerversion Flash 10 
* @playerversion AIR 1.5 
* @productversion Flex 4 
*/ 
[Style(name="lineThrough", type="Boolean", inherit="yes")]