【发布时间】:2023-03-23 16:34:01
【问题描述】:
可以使用htmlText 属性将图像包含在TextArea 控件中:
ta.htmlText = '<img src="http://..."/>';
我如何引用嵌入的图像?
一个例子:
<mx:TextArea xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
[Embed(source='../assets/img.gif')]
public var img:Class;
]]>
</mx:Script>
<mx:htmlText>
<![CDATA[
<img src="???" />
]]>
</mx:htmlText>
</mx:TextArea>
UPD:
<img src='../assets/img.gif />
在本地机器上工作,但在服务器环境中它会抛出:
错误 #2044:未处理的 IOErrorEvent:。文本=错误 #2035:未找到 URL。我该如何解决这个问题?
【问题讨论】:
标签: apache-flex htmltext