tags:

views:

2924

answers:

2

I would like to display some smiley's inbetween text in my chatbox but when i add an image it gets displayed on a seperate line...

Any ideas?

<mx:TextArea id="myChat" width="271" height="238" backgroundColor="#ffffff" borderThickness="0" editable="false" enabled="true" horizontalScrollPolicy="off" wordWrap="true">
    <mx:htmlText>
    <![CDATA[
         <font size='14'> some text - </font><img src='images/emoticons/wink_smile.gif' height='15' width='15'/><font size='14'> more text</font>
    ]]>          
    </mx:htmlText>
</mx:TextArea>
+2  A: 

Unfortunately Flash's support for the img tag in text fields is subpar; even in the official Flex 3 documentation it says:

"Note: The <img> tag is not fully supported, and might not work in some cases."

There's an issue in the Adobe bug tracker that seems to describe the exact problem you're having.

In any case, Valentin Manthei seems to have a solution for this. I haven't tried it myself, though.

hasseg
I'm aware of the poor html support, i'm almost certain there must be a simple hackThese guys have done it somehow: http://www.flashcomguru.com/commchat.cfm
Overbeeke
I agree that there must be a hack to get this to work, but I'm not sure it'll be simple ;) You should check out that SmileArea class by Valentin Manhei though.
hasseg
A: 

if you have made sure it could work,send me the all source to me,I need this component for my project now, [email protected]

roger