Apache flex flex4文本区域HTML

Apache flex flex4文本区域HTML,apache-flex,flex4,flex4.5,Apache Flex,Flex4,Flex4.5,问题是关于Flex4文本引擎: 我想 1) 将HTML文本附加到textArea text1 我可以像这样加载文本: var s:String='<p fontSize="12">TextArea with<span fontWeight="bold">TLF</span> block</p>'; text1.textFlow = TextFlowUtil.importFromString(text1.text + s, TextConverter

问题是关于Flex4文本引擎:

我想 1) 将HTML文本附加到textArea text1

我可以像这样加载文本:

var s:String='<p fontSize="12">TextArea with<span fontWeight="bold">TLF</span> block</p>';
text1.textFlow = TextFlowUtil.importFromString(text1.text + s, TextConverter .TEXT_FIELD_HTML_FORMAT);
var s:String='

textareawithtlf块

; text1.textFlow=TextFlowUtil.importFromString(text1.text+s,TextConverter.text\u字段\u HTML\u格式);
但是我不知道怎样才能写出新的文字

2) 将图像添加到文本区域

新TLF中的所有这些:有什么想法吗


关于

这将设置文本并加载图像,然后使用计时器每5秒追加一次文本:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               minWidth="955"
               minHeight="600"
               creationComplete="creationCompleteHandler(event)">

    <fx:Script>
        <![CDATA[
            import flashx.textLayout.conversion.TextConverter;
            import flashx.textLayout.elements.TextFlow;

            import mx.events.FlexEvent;

            [Bindable]
            private var text:String =
                "This text can be appended to.<br />" +
                "<br />" +
                "<img src=\"http://www.google.com/intl/en_com/images/srpr/logo3w.png\" />";


            private var timer:Timer;

            protected function creationCompleteHandler(event:FlexEvent):void
            {
                // 5-seconds later, append text
                timer = new Timer(5000);
                timer.addEventListener(TimerEvent.TIMER, timerHandler);
                timer.start();
            }

            protected function timerHandler(event:TimerEvent):void
            {
                text += "This is the appended text.<br />";
            }
        ]]>
    </fx:Script>

    <s:RichEditableText editable="false"
                        selectable="true"
                        textFlow="{TextConverter.importToFlow(text, TextConverter.TEXT_FIELD_HTML_FORMAT)}"
                        buttonMode="true"
                        width="100%"
                        height="100%" />

</s:Application>


这几乎是好事:问题是文本在闪烁:它似乎没有出现,而是完全重新加载,这令人沮丧。在搜索时,我在这里发现了与您类似的请求:-也许更符合您的要求。