Actionscript 3 HTML标记在HTML文本字段中显示为字符空间
这是我在文本字段中添加的HTML文本:Actionscript 3 HTML标记在HTML文本字段中显示为字符空间,actionscript-3,flash,Actionscript 3,Flash,这是我在文本字段中添加的HTML文本: <body><h1>A Boolean value that indicates</h1>Whether the text field is selectable. The value true indicates that the text is selectable. The selectable property controls whether a text field is selectable, not wh
<body><h1>A Boolean value that indicates</h1>Whether the text field is selectable. The value true indicates that the text is selectable. The selectable property controls whether a text field is selectable, not whether a text field is editable. A dynamic text field can be selectable even if it is not editable. If a dynamic text field is not selectable, the user cannot select its text.
If selectable is set to false, the text in the text field does not respond to selection commands from the mouse or keyboard, and the text cannot be copied with the Copy command. If selectable is set to true, the text in the text field can be selected with the mouse or keyboard, and the text can be copied with the Copy command. You can select text this way even if the text field is a dynamic text field instead of an input text field.
A Boolean value that indicates whether the text field is selectable. The value true indicates that the text is selectable. The selectable property controls whether a text field is selectable, not whether a text field is editable. A dynamic text field can be selectable even if it is not editable. If a dynamic text field is not selectable, the user cannot select its text.
If selectable is set to false, the text in the text field does not respond to selection commands from the mouse or keyboard, and the text cannot be copied with the Copy command. If selectable is set to true, the text in the text field can be selected with the mouse or keyboard, and the text can be copied with the Copy command. You can select text this way even if the text field is a dynamic text field instead of an input text field.
The default value is true.
A Boolean value that indicates whether the text field is selectable. The value true indicates that the text is selectable. The selectable property controls whether a text field is selectable, not whether a text field is editable. A dynamic text field can be selectable even if it is not editable. If a dynamic text field is not selectable, the user cannot select its text.
If selectable is set to false, the text in the text field does not respond to selection commands from the mouse or keyboard, and the text cannot be copied with the Copy command. If selectable is set to true, the text in the text field can be selected with the mouse or keyboard, and the text can be copied with the Copy command. You can select text this way even if the text field is a dynamic text field instead of an input text field.
The default value is true.
The default value is true.
</body>
以下是Flash Player内的输出:
正如您所看到的,在“布尔…”和“是否…”之前有额外的空格。我不知道为什么会这样。我做错了什么?事实上,问题是我没有在读取HTML的XML文件中添加标记。显然,如果您不使用在XML中编写HTML,HTML标记将始终是自动生成的。您可以很容易地看到有一个标记。尝试删除它-可能是因为这个..有一个标记,这就是为什么呈现绿色标题的原因(参见屏幕截图)。我无法删除标记。似乎有东西正在样式表中添加textIndent属性。如果您的“scrollBox”
var scrollable_text:TextField = new TextField();
scrollable_text.width=340;
scrollable_text.height=600;
scrollable_text.wordWrap=true;
scrollable_text.multiline=true;
scrollable_text.autoSize=TextFieldAutoSize.CENTER;
var style:StyleSheet = new StyleSheet();
style.parseCSS("body{font-family: Arial;} h1{font-size: 28px;font-weight: bolder;color:#87CA36;}");
scrollable_text.styleSheet=style;
scrollable_text.htmlText=hotspotWindowText[currentIndex]; //Fetching the HTML code from the array
scrollBox.source=scrollable_text;