Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html img标记在actionscript3文本字段中工作不正常_Html_Actionscript 3_Flash_Flash Builder_Textfield - Fatal编程技术网

Html img标记在actionscript3文本字段中工作不正常

Html img标记在actionscript3文本字段中工作不正常,html,actionscript-3,flash,flash-builder,textfield,Html,Actionscript 3,Flash,Flash Builder,Textfield,我有一个文本字段。 以下是一个片段: this.textField = new TextField(); this.textField.defaultTextFormat = font.format; this.textField.selectable = true; this.textField.border = true; this.textField.wordWrap = true; this.textField.multiline = true; 下面是向文本字段框添加新行的方法: t

我有一个文本字段。 以下是一个片段:

this.textField = new TextField();
this.textField.defaultTextFormat = font.format;
this.textField.selectable = true;
this.textField.border = true;
this.textField.wordWrap = true;
this.textField.multiline = true;
下面是向文本字段框添加新行的方法:

this.textField.htmlText = 'some text <IMG SRC="http://gravitatestudio.com/wp-content/themes/gravitate/images/facebook.png">';
this.textField.htmlText='some text';
问题是图像总是放在文本下,而不是文本的末尾

以下是添加html文本后的跟踪(this.textField.htmlText):

<P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="12" COLOR="#FFFFFF" LETTERSPACING="0" KERNING="0">some text <FONT SIZE="2"><IMG SRC="http://gravitatestudio.com/wp-content/themes/gravitate/images/facebook.png"> </FONT></FONT></P>

一些文本

此外,我还需要在文本的任何一侧添加一个图像,如使用微笑的聊天信息(文本的左侧、中部、右侧)


有什么建议吗?

TextField html文本非常有限,这就是为什么Adobe发布了TLFTextFields,这将使您能够更好地控制字段中元素的布局。我个人使用过它,并且用一个文本字段和图片、链接等进行了完整的聊天

资源: adobe:

教程: