i tried:
dyntxt.htmText="Test <img src='image/pic/laugh.gif' id='laugh1'> !!";
But nothing is being embedded, except "Test !!"......any ideas?
Printable View
i tried:
dyntxt.htmText="Test <img src='image/pic/laugh.gif' id='laugh1'> !!";
But nothing is being embedded, except "Test !!"......any ideas?
dyntxt.htmlText
I am surprised you did not get any error.
change htm to html and it works fine:
PHP Code:dyntxt.htmlText="Test <img src='http://www.make-some-noise.info/badges/88x31.gif' id='laugh1'> !!";
well it works now, but still, the image is not placed correctly within the text, and over that, i cannot attach more than one of the same image!
i am using the split.join instead of replace, because of my habit from as2, but can you guys give me any more suggestions on how to put multiple instances of same smiley and how to position them correctly?Code:function doReplace(msg):String
{
var _search:Array = [":b:","":_b:",":)"];
var _replace:Array = ["<b>","</b>","<img src='images/smiley/laugh.gif' id='::laugh"+i+"::'>"];
for(var i:int=0;i<_search.length;i++)
{
msg = msg.split(_search[i]).join(_replace[i]);
}
return msg;
}
You're trying to load a .gif file into TextField? TextField does not support animated gif files, if that's what you're hoping for. instead, try to use TextArea >> http://doitflash.com/
MyFlashLab Team
Hadi