0
简单的as2 Flash应用程序。那就是读取一个XML文件。Flash AS2,XML里面不接受HTML?
这里是Flash 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>
的问题是,FLASH动态文本框将无法读取XML(HTML)的HTML - - 所以<b>I'm BOLD</b>
标记不会作为我已经BOLD在闪存?我在想什么?谢谢。