Показать сообщение отдельно
Старый 31.01.2007, 10:32
MrKIT вне форума Посмотреть профиль Отправить личное сообщение для MrKIT Найти все сообщения от MrKIT
  № 1  
Ответить с цитированием
MrKIT

Регистрация: Apr 2006
Сообщений: 91
Отправить сообщение для MrKIT с помощью ICQ
По умолчанию вставка HTML

вот почему вот так работает

Код:
// Create a new text field.
this.createTextField("table_txt", 99, 50, 50, 200, 100);
table_txt.border=true;
table_txt.multiline = true;
table_txt.html = true;
// Creates column headers, formatted in bold, separated by tabs.
var rowHeaders:String = "<b>Name\tAge\tOccupation</b>";

// Creates rows with data.
var row_1:String = "Rick \t33\tDetective";
var row_2:String = "AJ \t35\tкошмар";

// Sets two tabstops, at 50 and 100 points.
table_txt.htmlText = "<textformat tabstops='[50,100]'>";
table_txt.htmlText += rowHeaders;
table_txt.htmlText += row_1;
table_txt.htmlText += row_2 ;
table_txt.htmlText += "</textformat>";
а вот так не хотит

Код:
this.createTextField("my_txt", 99, 10, 10, 520, 350);
this.my_txt.border=true;
this.my_txt.multiline = true;
this.my_txt.wordWrap = true;
this.my_txt.selectable = true;
this.my_txt.html = true;
var my_lv:LoadVars = new LoadVars();
my_lv.load("myText.txt", my_lv);
my_lv.onData = function(src:String) {
	if (src == undefined) {
		trace("Ошибка загрузки данных.");
		return;
	}
	lv_fun(src);
};
lv_fun = function (src) {
	this.my_txt.htmlText = src;
};
в TXT написанно следующие

Код:
<textformat tabstops='[50,100]'> 
<b>Name\tAge\tOccupation</b> 
Rick\t33\tDetective 
AJ\t35\tкошмар 
</textformat>