Показать сообщение отдельно
Старый 28.11.2006, 13:26
Andreih вне форума Посмотреть профиль Отправить личное сообщение для Andreih Найти все сообщения от Andreih
  № 1  
Ответить с цитированием
Andreih
[+ за варез]
 
Аватар для Andreih

Регистрация: Jun 2003
Адрес: Москва
Сообщений: 73
По умолчанию стиль для xml

Привет. Задаю ститили для текста в xml и ставлю туда же катинку и странная вещь получается текст обтикает картинку даже за приделами текстового поля. как это вылечить?
во флеше создаю 4-ре поля для теста и пишу код
Код:
var myStyle:TextField.StyleSheet = new TextField.StyleSheet();
myStyle.load("style.css");
p_Text.styleSheet = myStyle;
p_Text2.styleSheet = myStyle;
p_Title.styleSheet = myStyle;
p_Title2.styleSheet = myStyle;

System.useCodepage = true; 
var pxml:XML = new XML();
pxml.ignoreWhite = true;
pxml.onLoad = function(success:Boolean):Void {
	if (success) 
	{
		var root=this.firstChild;
		if (root.hasChildNodes())
		{
		var child = root.childNodes;
		for (var i = 0; i < child.length; i++)
		{
p_Title.htmlText = child[0].firstChild.nodeValue;
p_Text.htmlText = child[1].firstChild.nodeValue;
p_Title2.htmlText = child[2].firstChild.nodeValue;
p_Text2.htmlText = child[3].firstChild.nodeValue;
}}}}
pxml.load("rus.xml");
Вложения
Тип файла: rar flash.rar (11.0 Кб, 66 просмотров)
__________________
Живи и действуй!