flash中读取XML问题[FLASH AS 部分]

来源:互联网 发布:c语言对比字符串 编辑:程序博客网 时间:2024/06/05 21:56
var ts:XML = new XML();
ts.load("xml.xml");
ts.ignoreWhite = true;
ts.onLoad = function(good:Boolean) {
   if (good) {
      //_root.txt.text = ts.firstChild.childNodes[0].firstChild.firstChild.nodeValue
       trace(ts.firstChild.childNodes[1].firstChild.nodeValue )
      _root.txt.text = ts.childNodes[1].firstChild.firstChild.nodeValue
   }
};
 //这是FLASH里AS部分,为了读取XML的MATOKU字段名
原创粉丝点击