Hi Katrina,

Adding emoticons inline in text is very difficult. You cannot insert the image directly into the text field unless it is going to be left, center, or right justified. The approach is to search and replace the emoticon similies (like :-) ), with spaces and then overlay movie clip. This presents some problems too because Flash's text metrix aren't always trustworthy, so you can't consistently tell where to put the image. In addition, when you replace the :-) with spaces, your word wrapping might change. So instead of search-and-replace, maybe just recolor those characters to the color of the background.

I think your best bet would be to use a fixed-width font, like courier. Then you can just use some basic math to determine where the icons should go.

FYI: I got emoticons working in the chat on my site, and they work extremely well. The code is not pretty and uses some really silly techniques to get around the Flash Player bugs. As a result, if you compile it to a later version of Flash it stops working...because the bugs are either fixed or just different.

Jobe Makar
http://www.electrotank.com
http://www.electro-server.com
phone: 919-609-0408
mobile: 919-610-5754
fax: 919-341-8104
----- Original Message ----- From: "Karina Steffens" <[EMAIL PROTECTED]>
To: "'Flashcoders mailing list'" <flashcoders@chattyfig.figleaf.com>
Sent: Sunday, November 20, 2005 12:26 PM
Subject: RE: [Flashcoders] emoticons in a chat component


I almost forgot to mention - I'm using MX2004 and haven't upgraded to 8 yet.
Would that make any difference?

-----Original Message-----
From: Karina Steffens [mailto:[EMAIL PROTECTED]
Sent: 20 November 2005 17:24
To: 'Flashcoders mailing list'
Subject: [Flashcoders] emoticons in a chat component

Hi List,

I have a working FlashComm chat programme, dedicated to
online counselling.
It's been up and running for over half a year now, but now
the client wants me to add some new features, one of which is
emoticons.

I'm using the TextArea for the history component and
formatting the text with html, so I thought adding the
emoticons would be a simple matter of using the <img> tag in
the TextArea. But it doesn't want to work that way - the
emoticons are not displayed inline, but at the beginning of
the next line, wrapping the following text around them.
I need to find a way to to make them display in the same way
as a user would expect from a chat application. I've done
some research, but haven't found anything suitable yet. I
also don't want to use an emoticon font, because the results
are not what I'm looking for.

Any ideas? Is it possible to use a style sheet to position
them correctly?
Or give all images ids to move them around? Would I need to
overlay them on top of the text? Nothing too complicated I
hope, I've only estimated a couple of days for the job...

Thanks,
Karina


Karina Steffens  |  Neo-Archaic
creative & technical new media design
 <http://www.neo-archaic.net/> www.neo-archaic.net

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to