Простое приложение as2 flash. который читает файл XML.
Вот вспышка AS2:
function loadXML(loaded) {
if (loaded) {
_root.inventor = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.comments = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
name_txt.text = _root.inventor;
comment_txt.text = _root.comments;
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("inventors.xml");
А вот мой XML:
<?xml version="1.0"?>
<y>
<t>
<name>Name Here</name>
<description>Some Html or what not in here, <b>I'm BOLD</b></description>
</t>
<t>
<name>Name 2 Here</name>
<description>Some Html or what not in here</description>
</t>
<t>
<name>Name 3 Here</name>
<description>Some Html or what not in here</description>
</t>
</y>
Проблема в том, что динамическое текстовое поле флэш-памяти не будет читать XML (HTML) как HTML - поэтому тег <b>I'm BOLD</b>
не отображается как Я ПОЛНЫЙ во флеше ?? Чего мне не хватает ?? Спасибо.