I am using Macromedia Flash MX 2004 Professional and I have a text area component that i am using as a chat window. I want to be able to replace certain keywords with emoticons in the chat. I can replace the keywords no problem using regular expressions, but I can seem to get the images to dynamically fit into the text the way the are supposed to.
I have the string:
hello :-) how are you
I can replace this with:
hello <img src='smile'> how are you
but the image does not go where it is supposed to. I goes all the way to the right of the line. I would like to have the images placed dynamically in the text like a normal IM or chat application. Also, the image sometimes does not appear until another line of text is written to the TextArea.
Does anyone have a way to make this work?