I’ve been developing a text chat widget for a client of mine and as part of the specification there is a requirement for emoticons inside of the html text. As far as i understand it’s quite difficult to achieve but i thought that some of the new TextField methods in AS3 might provide some solutions.
This is my first experiment and the code is reasonably complex but it works so please try it and let me know what you think.
AS3 Text Chat With Emoticons (First Version)
UPDATE: Please see this post AS3 Text Chat With Emoticons (Latest Version)
October 4th, 2008 at 4:31 pm
My only suggestion would be to size the emoticons beforehand, the scaling is making it difficult to determine what the emoticon is.
Very solid though.
October 4th, 2008 at 4:59 pm
Thanks Nathan!
Fair comment so i’ll add it to the todo list.
Immediately i’m thinking of having different sizes of emoticons that get swapped out depending on text height…but there’s probably something even simpler 😉
October 4th, 2008 at 7:35 pm
[…] Link to the original site […]
October 8th, 2008 at 1:01 pm
vectors doug, vectors 😉
… also you can tie the size of the emoticon to the size of the code that it replaces. That way you can change the font size and see a change in the image size too.
October 8th, 2008 at 1:56 pm
I’ve got the resizing thing sorted already!
What do you mean about vectors Matt??? I guess it’s about using vectors over bitmaps when scaling (which i’m not yet doing).
November 20th, 2008 at 5:17 pm
This is something I’ve been looking for! Great job, I would love to help finish it up if you’re still working on it.
November 22nd, 2008 at 5:59 pm
@Dave – did you see this version??
It’s pretty much complete barring a few minor bugs with the emoticon parser.
Let me know what you’re up to and we can have a chat about this in more detail if you want.
February 2nd, 2009 at 1:59 am
GREAT WORK!
i’m developing a similar chat in Flex but i have some problems with gif files alignment in htmlText.
For example, replacing three strings typed in a line with proper gif emoticons, the images are displayed out of line… in the bottom of text, one under the other.
What textfield class or component are you using?
I’m using TextArea and it seems there are several bugs in it…
Using swf files instead of gif will solve some alignment problems?
Thankyou Doug!
February 2nd, 2009 at 10:52 am
@rand see the other post
March 28th, 2009 at 12:54 pm
Doug:
Since you possible have a solution for me, can you let me know if you ever finish your chat version? We are current trying to migrate an as2 flash chat version to as3, so you could have it ready to go, can you contact me and have a conversation about it? muwiess@hotmail.com
March 29th, 2009 at 8:44 am
Hi manuel did you see this version?
March 30th, 2009 at 3:21 pm
Yes I have, but when it initilizes says:
unexpexted server initialization error!
NetConnection.Connect.Failed
that is in firefox, on exporer doesn’t say anything.
Where I can look the code? It has a cost?
I will like to test it on my applet
Manuel
March 30th, 2009 at 3:26 pm
Actually I could login to a different room than demo.
I like the feature of add different rooms.
Manuel
July 30th, 2009 at 1:08 am
found a bug: the emoticons doesn’t scroll with the textfield.. when the textfield has too many lines and you use the mid-button to scroll the textfield the emoticons stay where they are.
July 30th, 2009 at 8:34 am
If you look at the comments above you should find a link to the latest version which doesn’t have that issue and has many more features.
Cheers
October 15th, 2010 at 12:06 pm
download this chat?
January 2nd, 2011 at 10:25 am
[…] AS3 Text Chat With Emoticons (Initial Prototype) October 200816 comments […]