Groups | Blog | Home
all groups > flash actionscript > september 2005 >

flash actionscript : how to insert img into htmltext


buraksan
9/1/2005 10:53:29 PM
hi everyone
i could not manage to insert an image into my html text. here is the code:

this.createTextField("my_txt", this.getNextHighestDepth(), 10, 100, 200,
222);
my_txt.html = true;
my_txt.border = true
my_txt.multiline = true
my_txt.wordWrap= true


//Creates column headers, formatted in bold, separated by tabs
var rowHeaders = "<b>Name\tAge\tDepartment</b><br><br>";

//Creates rows with data
var row_1 = "Tim\t32\tFinance";
var row_2 = "Edwin\t46\t<img src='cross'>";

//Sets two tabstops, to 50 and 100 points
my_txt.htmlText = "<textformat tabstops='[50,100]'>";
my_txt.htmlText += rowHeaders;
my_txt.htmlText += row_1+"<br><br>";
my_txt.htmlText += row_2 ;
my_txt.htmlText += "</textformat>";


I have a mc in my library whose linkage identifier is "cross"...I also tried
to insert swf from library but again it does not work.

kglad
9/2/2005 12:00:00 AM
try:

s = "<textformat tabstops='[50,100]'>";
s += rowHeaders;
s += row_1+"<br><br>";
s += row_2 ;
s += "</textformat>";
my_txt.htmlText = s;

AddThis Social Bookmark Button