Actionscript Spark文本区中的HTML

Actionscript Spark文本区中的HTML,actionscript,mobile,flex4,Actionscript,Mobile,Flex4,试图向Mobile Flex 4.5中的文本区域添加一些html,但不断出现错误: “1180:调用可能未定义的 方法StyleableTextField。“ 对于以下行: StyleableTextField(txtMyText.textDisplay).htmlText = "sample <b>text</b>"; StyleableTextField(txtMyText.textDisplay).htmlText=“示例文本”; 您不能直接设置TextArea实

试图向Mobile Flex 4.5中的文本区域添加一些html,但不断出现错误:

“1180:调用可能未定义的 方法StyleableTextField。“

对于以下行:

StyleableTextField(txtMyText.textDisplay).htmlText = "sample <b>text</b>";
StyleableTextField(txtMyText.textDisplay).htmlText=“示例文本”;

您不能直接设置TextArea实例的htmlText属性吗

大概是这样的:

myTextArea.htmlText = "sample <b>text</b>";
myTextArea.htmlText=“示例文本”;
Rob看起来像:

MobileTextField(txtMyText.textDisplay).htmlText = "sample <b>text</b>";

使其工作。

触发:通过静态类型spark的引用访问可能未定义的属性htmlText。组件:TextArea请记住,因为这是一个移动应用程序,所以似乎不支持textFlow属性。
import spark.components.supportClasses.MobileTextField;