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在閃存?我在想什麼?謝謝。