I have a desktop chat app and a text field would add images (typical emoticons) and what can not do wrong that I can not display any images. Use a file in which text is stored chat, which divided by lines on a table and then analyzed. What I do is when I send an emoticon, I select a folder and sending its location to chat and then I check to display the selected image as appropriate. But I do not get to see anything.
public function newchat8()
{
msgArray8 = new Array;
msgArray8 = elmsg2.split("\n");
ii=Number(msgArray8.length);
ii--;
mi_formato.size=15;
loschat8=new TextField;
loschat8.height = 500;
loschat8.width = 400;
loschat8.multiline = true;
loschat8.wordWrap = true;
loschat8.setTextFormat(mi_formato);
for (i=0; i<ii; i++)
{
newchat_b8();
comprobar_enlace8();
}
loschat8.scrollV=loschat8.maxScrollV;
}
public function newchat_b8()
{
swusuario = msgArray8[i].indexOf(usuariob);
if (swusuario != -1)
{ elcolor2 = elcolor; }
else
{ elcolor2 = "#151515"; }
loschat8.htmlText=loschat8.htmlText + '<P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="20" COLOR="' + elcolor2 + '" ><b>' + msgArray8[i] + '</b></FONT></P>';
//loschat8.htmlText=loschat8.htmlText + msgArray8[i];
}
public function comprobar_enlace8()
{
swlink = msgArray8[i].indexOf("z:/intranet/emoticonos/");
if (swlink != -1)
{
swlink2 = Number(msgArray8[i].length);
elmsg4="<img src='carita.jpg' width='50' height='50'>";
loschat8.htmlText=loschat8.htmlText + elmsg4;
}
loschat8.scrollV=loschat8.maxScrollV;
}